Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Test-a-function/REXX/test-a-function-1.rexx
Normal file
9
Task/Test-a-function/REXX/test-a-function-1.rexx
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*REXX program stresses various REXX functions (BIFs), many BIFs are used as variables. */
|
||||
signal=(interpret=value); value=(interpret<parse); do upper=value to value; end
|
||||
exit=upper*upper*upper*upper-value-upper; say=' '; return=say say say; with.=signal
|
||||
do then=value to exit; pull=''; do otherwise= upper to then-,
|
||||
value; select=otherwise-value; if.otherwise=with.otherwise+with.select; end
|
||||
if.value=value; if.then=value; do otherwise=value to exit-then; pull=pull,
|
||||
say''say; end; do otherwise=value to then; pull=pull center(if.otherwise,,
|
||||
length(return)); end; say pull; do otherwise=value to exit; with.otherwise=,
|
||||
if.otherwise; end; end; exit 0 /*stick a fork in it, we're all done. */
|
||||
21
Task/Test-a-function/REXX/test-a-function-2.rexx
Normal file
21
Task/Test-a-function/REXX/test-a-function-2.rexx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*REXX program shows a secret message to the terminal by using REXX built─in functions. */
|
||||
z.=' '; z= 12-25-2002; y= z; w= -y
|
||||
z.0= translate( right( time('c'), substr(z, 4, z==y)))
|
||||
z.1= left( substr( format(z, 2, z==y, , z==y.1), 5), z==y)
|
||||
z.2= copies( right( symbol('z.'20), z==y), left(w, 1))
|
||||
z.3= translate( right( date('w'), z==y))
|
||||
z.5= right( form(), z==y)
|
||||
z.6= x2c( d2x( x2d( c2x( substr( symbol( substr(z, 2)), 2, z==y))) - 1))
|
||||
z.7= right( symbol('z.' || (z\==z) ), z==y)
|
||||
z.8= substr( form(), (z==y) + left(w, 1), z==y)
|
||||
z.9= reverse( left( form(), z==y))
|
||||
z.10= left( substr( form(), 6), z==y)
|
||||
z.11= right( datatype(z), z==y)
|
||||
z.12= substr( symbol(left(z, z=z)), left(w, 1), z==y)
|
||||
z.13= left( form(), z==y)
|
||||
|
||||
do z=-31 to 31; z.32= z.32 || z.z; end
|
||||
say
|
||||
say z.32
|
||||
say
|
||||
exit 0 /*stick a fork in it, we're all done. */
|
||||
Loading…
Add table
Add a link
Reference in a new issue