home .. forth .. colorforth mail list archive ..

[ColorForth] Passing values from Compiletime to Runtime


> Von: t <loveall@xxxxxxxxx>
> An: ColorForth List Member <ColorForth@xxxxxxxxxxxxxxxxxx>
> Betreff: [ColorForth] Passing values from Compiletime to Runtime
> Datum: Donnerstag, 3. Mai 2001 08:39
> 
> Dirk,
> 
> Here is the high level definition in quasi-ANSI forth for the interpreter
> from the ColorMan.txt doc file:
> 
> BEGIN                     ( get input and interpret loop)
[...]
> REPEAT                    ( forever)
> 
> <red>1+<ltblue>1<purple><green>+<black>;
> (These are the correct colors from 4word).
> 
> All it does is delimit strings and look them up in the dictionary,
period.

Allright, that's what i expected.

> 
> <red> says delimit the next string and create a dictionary entry.
> 
> Numbers are valid numeric strings prefixed with a color that says the
next
> string is a number. Delimit and convert per the (ltblue for hex)
specified
> number base.
> 
> Then a number can be post-fixed by a different color (purple) to say
'take
> the number on top of the parameter stack and compile it inline'.
> 
> This is where the double colors come in. If 'compiling' you have the
'inline
> literal' color followed by the 'delimit the next string, find in
dictionary
> and compile' color (green).

Okay, so there's no context-sensitive magic, but a double color
token. 

> 
> Finally, ';' is in normal forth terms an 'IMMEDIATE' definition which
> implicitly interprets the word. 4word ColorForth says why be implicit?
> Prefixing ';' with black says intrepret the next word. No need for
> 'IMMEDIATE' and I understand what the compiler is doing. BTW tail
recursion
> in 4word is _explicitly_ invoked with the definition ';;'.
> 
> Regards,
> Terry

Allright. So i got it right, i think. In any case, the double color
token doesn't please me... the only way to see it is to move 
the cursor on top of it, right? I'd really like a visible operator
for that, if not ">", maybe "~" or "|"... 
Now, no need to argue, i just have to implement that and use it
and see what it's like. I'm still busy with my classical Forth 
interpreter ATm, though, so you will have to wait a little while
until i can report... Don't know if i extend your implementation
or write my own, i gotta see.

Until then

Dirk

------------------------

To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems   -   List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site   -   http://www.ultratechnology.com