all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
10
Task/Variables/REXX/variables-1.rexx
Normal file
10
Task/Variables/REXX/variables-1.rexx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
aa = 10 /*assigns chars 10 ───► AA */
|
||||
bb = '' /*assigns a null value ───► BB */
|
||||
cc = 2*10 /*assigns charser 20 ───► CC */
|
||||
dd = 'Adam' /*assigns chars Adam ───► DD */
|
||||
ee = "Adam" /*same as above ───► EE */
|
||||
ff = 10. /*assigns chars 10. ───► FF */
|
||||
gg = '10.' /*same as above ───► GG */
|
||||
hh = "+10" /*assigns chars +10 ───► hh */
|
||||
ii = 1e1 /*assigns chars 1e1 ───► ii */
|
||||
jj = +.1e+2 /*assigns chars +.1e+2 ───► jj */
|
||||
12
Task/Variables/REXX/variables-2.rexx
Normal file
12
Task/Variables/REXX/variables-2.rexx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
kk = '123'x /*assigns hex 00000123 ───► KK */
|
||||
kk = 'dead beaf'X /*assigns hex deadbeaf ───► KK */
|
||||
ll = '0000 0010'b /*assigns blank ───► LL (ASCII) */
|
||||
mm = '0000 0100'B /*assigns blank ───► MM (EBCDIC)*/
|
||||
|
||||
xxx = '11 2. 333 -5'
|
||||
parse var xxx nn oo pp qq rr
|
||||
/*assigns 11 ───► NN */
|
||||
/*assigns 2. ───► OO */
|
||||
/*assigns 333 ───► PP */
|
||||
/*assigns ─5 ───► QQ */
|
||||
/*assigns "null" ───► RR */
|
||||
20
Task/Variables/REXX/variables-3.rexx
Normal file
20
Task/Variables/REXX/variables-3.rexx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*REXX pgm to do a "bad" assignment (with an unassigned REXX variable).*/
|
||||
|
||||
signal on novalue /*usually, placed at pgm start. */
|
||||
|
||||
xxx=aaaaa /*tries to assign aaaaa ───► xxx */
|
||||
|
||||
say xxx 'or somesuch'
|
||||
exit
|
||||
|
||||
novalue: /*this can be dressed up better. */
|
||||
badLine =sigl /*REXX statement num that failed.*/
|
||||
badSource=sourceline(badLine) /*REXX source statement ··· */
|
||||
badVar =condition('D') /*REXX var name that's ¬ defined.*/
|
||||
say
|
||||
say '*** error! ***'
|
||||
say 'undefined variable' badvar "at REXX statement number" badLine
|
||||
say
|
||||
say badSource
|
||||
say
|
||||
exit 13
|
||||
Loading…
Add table
Add a link
Reference in a new issue