Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*REXX program demonstrates a simple array usage. */
|
||||
a.='not found' /*value for all a.xxx (so far).*/
|
||||
do j=1 to 100 /*start at 1, define 100 elements*/
|
||||
a.j=-j*100 /*define as negative J thousand. */
|
||||
a.j=-j*1000 /*define as negative J thousand. */
|
||||
end /*j*/ /*the above defines 100 elements.*/
|
||||
|
||||
say 'element 50 is:' a.50
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*REXX program demonstrates array usage with mimicry. */
|
||||
a. = 'not found' /*value for all a.xxx (so far). */
|
||||
a. = 00 /*value for all a.xxx (so far). */
|
||||
do j=1 to 100 /*start at 1, define 100 elements*/
|
||||
a.j = -j * 100 /*define element as -J hundred. */
|
||||
end /*j*/ /*the above defines 100 elements.*/
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
array. = 'out of range' /*define ALL elements to this. */
|
||||
|
||||
do j=-3000 to 3000 /*start at -3k, going up to +3k.*/
|
||||
array.j=j**2 /*define element as it's square. */
|
||||
array.j=j**2 /*define element as its square. */
|
||||
end /*j*/ /* [↑] defines 6,001 elements. */
|
||||
g=-7
|
||||
say g "squared is:" array.g
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue