Create a two-dimensional array at runtime: Difference between revisions

no edit summary
(Create a two-dimensional array at runtime in various BASIC dialents (BASIC256, QBasic, True BASIC and Yabasic))
No edit summary
Line 302:
end.</lang>
 
=={{header|Amazing Hopper}}==
Amazing Hopper crea arrays de forma dinámica.
<lang Amazing Hopper>
#include <flow.h>
#import lib/input.bas.lib
#include include/flow-input.h
 
DEF-MAIN
CLR-SCR
MSET(nRow, nCol)
LOCATE( 2,5 ), PRN("Input size rows :")
LOC-COL( 23 ), LET( nRow := ABS(VAL(READ-NUMBER( nRow ) )))
LOCATE( 3,5 ), PRN("Input size cols :")
LOC-COL( 23 ), LET( nCol := ABS(VAL(READ-NUMBER( nCol ) )))
COND( IS-NOT-ZERO?( MUL(nRow,nCol) ) )
DIM(nRow, nCol) AS-VOID( array )
BLK-[1,1], {100} PUT(array)
PRNL("\tElement at position 1,1 : ", GET(array) )
CLEAR(array) /* destroy array */
CEND
END
SUBRUTINES
</lang>
{{out}}
<pre>
Input size rows : 30
Input size cols : 30
Element at position 1,1 : 100
</pre>
=={{header|APL}}==
Arrays are an integral part of APL. Array size, shape, and data type can be easily manipulated at runtime.
543

edits