example added
This commit is contained in:
yabwon
2020-07-30 19:02:34 +02:00
committed by GitHub
parent d59fb10575
commit 21827e7ffa

View File

@@ -4,11 +4,43 @@ Currently the following packages are available:
- **SQLinDS**\[2.1\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
```
data class;
set %SQL(select * from sashelp.class order by age);
set %SQL(
select age, name, weight, height
from sashelp.class
order by age
);
WH = weight + height;
run;
```
- **DFA** (Dynamic Function Arrays)\[0.2\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
```
%createDFArray(ArrDynamic, resizefactor=17);
data _null_;
call ArrDynamic("Allocate", -2, 2);
do i = -2 to 2;
call ArrDynamic("Input", i, 2**i);
end;
L = .; H = .;
call ArrDynamic("Dim", L, H);
put L= H=;
call ArrDynamic("+", 3, 8);
call ArrDynamic("+",-3, 0.125);
call ArrDynamic("Dim", L, H);
put L= H=;
Value = .;
do i = L to H;
call ArrDynamic("O", i, Value);
put i= Value=;
end;
run;
```
- **macroArray**\[0.3\], implementation of an array concept in a macrolanguage, e.g.
```
@@ -42,4 +74,3 @@ format x bool.;
- **dynMacroArray**\[0.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA)
### ======