home *** CD-ROM | disk | FTP | other *** search
- 1 and 2 dimensional arrays ( 1 and 2 dimensional array definitions ) FORTH DEFINITIONS : ARRAY ( compile: n -- ; exec: n -- addr ) <BUILDS DUP , DUP + ALLOT DOES> (ARRAY) ; : STRING ( compile: n -- ; exec: n -- addr ) <BUILDS DUP , ALLOT DOES> (CARR) ; : 2ARRAY ( compile: rows cols -- ; exec: row col -- addr ) <BUILDS 2DUP , , * DUP + ALLOT DOES> (2ARR) ; : STRINGS ( compile: n maxlen -- ; exec: n char -- addr ) <BUILDS SWAP 2DUP , , * ALLOT DOES> (2CARR) ;