Re: Request for code clarification
dave selby <[email protected]> Fri, 22 Nov 2024 09:54:02 +0000
| Newsgroups | gmane.comp.lang.forth.gforth |
|---|---|
| Message-ID | <CA+-BTTyEW1XR1R82fRKC7ffnSKvR6A73Hsyb7F40JJFePt452Q@mail.gmail.com> |
Thank you for your email ,
So what is the reason for referencing an older version of ( Is it purely
historical ?
Kind Regards
Dave Selby (Engineer 784)
On Thu, 21 Nov 2024, 22:44 Anton Ertl, <anton-eMTcDWn+JWX/RkxMZTRrOJdqbFPxfnh/@public.gmane.org>
wrote:
> On Thu, Nov 21, 2024 at 10:05:28PM +0000, dave selby wrote:
> > Hello
> >
> > Not sure if this is the correct forum to ask but there is a bit of code I
> > don't understand. I am looking to define (( .. )) and was looking at ( )
> > code, it all makes sense except for the first line
> >
> > loadfile @ 0= IF postpone ( EXIT THEN
> >
> > Why would you postpone an earlier definition of ( if you are on the
> command
> > line and not compiling ?
>
> We want to append the compilation semantics of the previous ( to the
> new (. For (, the compilation semantics, interpretation, and
> execution semantics are the same (it's a proper immediate word).
>
> What would you write?
>
> loadfile @ 0= IF ( EXIT THEN
>
> No, that would just comment out the code starting with "(".
>
> loadfile @ 0= IF [compile] ( EXIT THEN
>
> That has the same effect for "(" as using POSTPONE.
>
> loadfile @ 0= IF ['] ( compile, EXIT THEN
>
> For "(", this has the same effect as using POSTPONE.
>
> - anton
>