none) (albert
2022-11-14 12:10:39 UTC
A useful word that I use more and more is an addition
to the ALLOCATE wordsset.
Often words are geared towards creating a data structure at
HERE. They can be in the way. >ALLOC moves it to allocated
space.
\ Make a freshly created object at `HERE permanent.
: >ALLOC DUP >R HERE OVER - DUP ALLOCATE THROW
DUP >R SWAP MOVE R> R> DP ! ;
\ DP ! can be replace by a negative ALLOT.
Example (counted strings)
CREATE animals
HERE 3 C, &a C, &a C, &p C, >ALLOC ,
HERE 4 C, &g C, &e C, &i C, &t C, >ALLOC ,
animals 1 CELLS + COUNT TYPE
goat
Groetjes Albert
to the ALLOCATE wordsset.
Often words are geared towards creating a data structure at
HERE. They can be in the way. >ALLOC moves it to allocated
space.
\ Make a freshly created object at `HERE permanent.
: >ALLOC DUP >R HERE OVER - DUP ALLOCATE THROW
DUP >R SWAP MOVE R> R> DP ! ;
\ DP ! can be replace by a negative ALLOT.
Example (counted strings)
CREATE animals
HERE 3 C, &a C, &a C, &p C, >ALLOC ,
HERE 4 C, &g C, &e C, &i C, &t C, >ALLOC ,
animals 1 CELLS + COUNT TYPE
goat
Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
***@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
***@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst