View Single Post
  #31 (permalink)  
Old 04-25-2012, 08:27 PM
Elizabeth D. Rather
Guest
 
Posts: n/a
Default Re: Reformulation of "STATE @ IF"

On 4/25/12 9:29 AM, Rod Pemberton wrote:
> "Andrew Haley"<andrew29@littlepinkcloud.invalid> wrote in message
> news:Evqdnco6j4dqIwrSnZ2dnUVZ_j6dnZ2d@supernews.co m...
>> Rod Pemberton<do_not_have@notemailnot.cmm> wrote:

> ...
>
>>> Later on, they merged
>>> COMPILE and [COMPILE] into state-aware POSTPONE .

>>
>> POSTPONE isn't state-aware.
>>

>
> It's true that POSTPONE is not explicitly aware of STATE. But, it is
> state-aware. It's aware of words marked IMMEDIATE. IMMEDIATE is used to
> change the behavior of words when used with other words that change STATE.
> POSTPONE has to be aware of which words are IMMEDIATE in order to change the
> way they are compiled for when those compiled words are used in STATE-aware
> situations. If POSTPONE wasn't state-aware, as you've stated, it wouldn't
> have to check for immediacy at all. I.e., COMPILE and [COMPILE] aren't
> state-aware.


Being "state aware" means the word itself behaves differently in
compilation mode than in interpret mode. POSTPONE is definitely not
state-aware. Checking the IMMEDIATE bit in a word that is being
postponed is part of its definition, but doesn't mean it's state-aware.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
Reply With Quote