Code: Select all
Sub Main
|create 2d array 10x2 in size
/declare test2[10,2] string local NULL
|assign values to array
/varset test2[1,1] test11
/varset test2[1,2] test12
/varset test2[2,1] test21
/varset test2[2,2] test22
|returns /varset 'test2[-1]' failed, out of bounds on array
/varset test2[3,1] test31
|returns /varset 'test2[-1]' failed, out of bounds on array
/varset test2[3,2] test32
/echo ${test2[1,1]} -- ${test2[1,2]} |test11 -- test 12
/echo ${test2[2,1]} -- ${test2[2,2]} |test21 -- test22
/echo ${test2[3,1]} -- ${test2[3,2]} |NULL -- NULL
|tried just for the hell of it to swap the 2 locations, knowing it shouldn't work, which it doesn't as it should
|returns /varset 'test2[-1]' failed, out of bounds on array
/varset test2[1,3] test13
/echo ${test2[1,3]} |NULL
/return
btw, MQ2-20040429.zip (29-Apr-2004 03:19) build



