RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/NetRexx/create-a-two-dimensional-array-at-runtime.netrexx
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

12 lines
380 B
Text

/* NetRexx */
options replace format comments java crossref symbols nobinary
say "give me the X and Y dimensions as two positive integers:"
parse ask xDim yDim
xPos = xDim % 2 -- integer divide to get close to the middle of the array
yPos = yDim % 2
arry = Rexx[xDim, yDim]
arry[xPos, yPos] = xDim / yDim -- make up a value...
say "arry["xPos","yPos"]:" arry[xPos, yPos]
return