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

[colorforth] colorforth code in ASCII


Bob Shafer wrote:
> 
> We visited this issue a month or so ago, when I published a hello world
> program here on the list, using an ascii encoding using \X, where the X is
> the icon that you press in the editor to get into whatever color. Very
> much along the lines being proposed here.
> 
> On seeing it, Chuck commented that we should just use a normal Forth
> style: : for defining words, ( for comments, and so on. In that style, we
> get something like:
> 
>   hex
>   : bsy 1f7 p@ 80 and if bsy ; then ;

I considered using : for defining words, but I was playing with the wiki
at the time and wondered if it might be possible to get the wiki to
automatically colourise code.

You're still going to need some way to deal with the other colour tokens
though. You could use postpone to compile macros and hex and decimal
before numbers which would almost make it look like ANS ;).

-- 
George Morrison
Aberdeen, Scotland------------------------

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.colorforth.com