I am quite new to Rexx, really basic stuff here, I want to get the last element of an array quickly.
Open Object Rexx 4.2.0 for Windows:
test.0=2
test.1="foo"
test.2="bar"
say test.[test.0]
==> Output as wanted:
bar
My easy guess is that the Open Object Rexx interpreter is at work. Square brackets can't be used with Rexx on z/OS.
1st stuff that came to my mind (didn't RTFM) :
say test.test.0
say test.(test.0)
==> Output not good:
TEST.TEST.0
5 *-* say test.(test.0)
Error 16 running Test.REX line 5: Label not found
Error 16.1: Label "SYNTAX" not found
Is there other usages of square brackets ? Why coming from C/Java/Python I am going for test.test.0 or test.(test.0) like a dummy ?
Can't find more information about square brackets usage in Rexx than this: #Reginald's tail expression
So under z/OS for now I am stuck with:
temp=test.0
say test.temp