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

[colorforth] colorforth code in ASCII


http://kristopherjohnson.net/cgi-bin/twiki/view/Main/ColorForthInASCII

This is a proposal for representing ColorForth code in ASCII in order to
enable exchange via email and netnews. 

Tags will indicate a change in colour i.e. a tag will persist until
another tag is specified. Numbers will be preceded by d# for decimal and
h# for hex. 

Tags by function 

Tag     Function 
 d~     define (followed by implicit compile) 
 c~     compile 
 m~     compile macro 
 e~     execute 
 v~     variable 
 \      comment 
 \c     capitalised 
 \a     all caps 

An alternative is to base the tags on colour 

 Tag     Colour 
 r~      red (followed by implicit green) 
 g~      green 
 c~      cyan 
 y~      yellow 
 m~      magenta 
 w~      white 
 wc~     white (capitalised) 
 wa~     white (all caps) 

Some examples

( by function ) 
d~ bsy h# 1f7 p@ h# 80 and if bsy ; then ;
( by colour ) 
r~ bsy h# 1f7 p@ h# 80 and if bsy ; then ;


( by function ) 
e~ macro
d~ 0 m~ ?dup c~ h# C031 2, ;
( by colour ) 
y~ macro
r~ 0 c~ ?dup g~ h# C031 2, ;

-- 
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