Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Array-length/REXX/array-length.rexx
Normal file
17
Task/Array-length/REXX/array-length.rexx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* REXX ----------------------------------------------
|
||||
* The compond variable a. implements an array
|
||||
* By convention, a.0 contains the number of elements
|
||||
*---------------------------------------------------*/
|
||||
a.=0 /* initialize the "array" */
|
||||
call store 'apple'
|
||||
Call store 'orange'
|
||||
Say 'There are' a.0 'elements in the array:'
|
||||
Do i=1 To a.0
|
||||
Say 'Element' i':' a.i
|
||||
End
|
||||
Exit
|
||||
store: Procedure Expose a.
|
||||
z=a.0+1
|
||||
a.z=arg(1)
|
||||
a.0=z
|
||||
Return
|
||||
Loading…
Add table
Add a link
Reference in a new issue