Anonymous user
Create a two-dimensional array at runtime: Difference between revisions
Create a two-dimensional array at runtime (view source)
Revision as of 16:38, 14 August 2007
, 16 years ago+ Forth
(Undo revision 6520 by Special:Contributions/ZawUjj (User talk:ZawUjj)) |
(+ Forth) |
||
Line 109:
The <code>[http://www.lispworks.com/documentation/HyperSpec/Body/m_assert.htm assert]</code> will allow the user to reenter the dimensions if they are not positive integers.
==[[Forth]]==
[[Category:Forth]]
: cell-matrix
create ( width height "name" ) over , * cells allot
does> ( x y -- addr ) dup cell+ >r @ * + cells r> + ;
5 5 cell-matrix test
36 0 0 test !
0 0 test @ . \ 36
==[[Java]]==
|