Re: new color

<[email protected]>
Newsgroups gmane.comp.lang.forth.colorforth
Message-ID <[email protected]>
>Anyway, I get what you're doing now.  With defer
>in a word it's address pushed from the return
>stack to the parameter stack so you can store
>it in the jump table rather than execute it.
>But here's what I don't get now.  What keeps
>"defer" from executing the second time when
>the address is executed from the jump table?

Here you have to know a little about how call/return work. 
Call pushes the address of the next instruction, therefore 
what ever instruction follows 'defer' is the address which 
is returned. Strings, arrays are implemented very similar. 
Look in block 48, to see that 'defer' goes by name 
of 'string' there. In the case of arrays the the 
call 'array' is aligned so the next address is divisable by 
4.

: string pop ;
: array pop 2/ 2/ ;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.