Sujet : Re: Juggling system-compilation items
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forthDate : 11. Aug 2024, 10:09:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v99v4r$kldc$3@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 2024-08-11 12:38,
albert@spenarnc.xs4all.nl wrote:
In article <v98sed$kldc$2@dont-email.me>, Ruvim <ruvim.pinka@gmail.com> wrote:
On 2024-08-10 12:57, PMF wrote:
I think !csp and ?csp are common also in other systems. I certainly did
not invent them.
>
Yes, it's a simple method to check the control-flow structures balance
from the FIG-Forth model.
>
I would suggest avoiding this method in Forth implementations.
It saved me a lot of mistakes. ciforth reports an error.
If you care to look the error up in the documentation, you can see
that you can turn this off, if you want to.
I don't mean removing this check. I mean using another implementation.
This check is easy to implement without being tied to stack depth.
For example:
-1023 here + constant colon-magic
: :noname ( -- xt colon-sys )
:noname colon-magic
;
: : ( "name" -- colon-sys )
: colon-magic
;
: ; ( colon-sys -- )
colon-magic <> -22 and throw
postpone ;
[ drop ] \ due to new `:` and old `;`
; immediate
: does> ( colon-sys -- colon-sys )
colon-magic <> -22 and throw
postpone does> colon-magic
; immediate
-- Ruvim