langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,12 @@
mainproc: proc options(main) reorder;
subproc: proc;
dcl subvar char init ('X');
put skip data(subvar);
subvar = 'Q';
end subproc;
call subproc();
call subproc();
end mainproc;

View file

@ -0,0 +1,17 @@
mainproc: proc options(main) reorder;
dcl ctlvar char ctl;
alloc ctlvar;
ctlvar = 'A';
alloc ctlvar;
ctlvar = 'B';
alloc ctlvar;
ctlvar = 'C';
put skip data(ctlvar);
free ctlvar;
put skip data(ctlvar);
free ctlvar;
put skip data(ctlvar);
free ctlvar;
end mainproc;

View file

@ -0,0 +1,27 @@
mainproc: proc options(main) reorder;
dcl list_ptr ptr init (sysnull());
dcl list_top ptr init (sysnull());
dcl list_end ptr init (addr(list_top));
dcl i fixed bin (31);
dcl 1 list based(list_ptr),
2 list_nxt ptr init (sysnull()),
2 list_data fixed bin (31) init (i);
/*
* Allocate the list
*/
do i = 1 to 4;
alloc list;
list_end -> list_nxt = list_ptr;
list_end = list_ptr;
end;
/*
* Print the list
*/
do list_ptr = list_top repeat list_nxt
while(list_ptr ^= sysnull());
put skip list(list_data);
end;
end mainprog;