RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/NetRexx/create-a-two-dimensional-array-at-runtime.netrexx
2023-07-01 13:44:08 -04: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