RosettaCodeData/Task/Create-a-two-dimensional-ar.../NetRexx/create-a-two-dimensional-ar...

13 lines
380 B
Plaintext

/* 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