Create a two-dimensional array at runtime: Difference between revisions
Content added Content deleted
(added RPL) |
|||
Line 3,099: | Line 3,099: | ||
aList[1][2] = 10 See aList[1][2] + nl |
aList[1][2] = 10 See aList[1][2] + nl |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
« "# rows?" "3" INPUT "# columns?" "5" INPUT <span style="color:grey">''@ ask for size, with 3 and 5 as default values''</span> |
|||
2 →LIST STR→ 0 CON <span style="color:grey">''@ create array in stack''</span> |
|||
{ 1 2 } TIME PUT <span style="color:grey">''@ put current time at array[1,2] ''</span> |
|||
{ 1 2 } GET <span style="color:grey">''@ read array[1,2] and remove array from the stack ''</span> |
|||
» '<span style="color:blue">TASK' STO</span> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |