[colorforth] Hello, World! and other simple programs
- Subject: [colorforth] Hello, World! and other simple programs
- From: Kristopher Johnson <kristopher_d_johnson@xxxxxxxxx>
- Date: Thu, 26 Jul 2001 13:33:55 -0700 (PDT)
--- Jeff Fox <fox@xxxxxxxxxxxxxxxxxxx> wrote:
> The : nemit ( n [ n...] .. ) for emit next ;
>
> seems very poor style instead of word like TYPE
> that takes an address and count. Or better yet,
> the address of a packed and counted string.
> Putting each character on the stack first as
> in : hello, 46 3 12 12 4 [ 20 cap ] 6 nemit ;
> is just not how a stack should be used.
I agree. I based my code upon how Chuck defined his 'logo' word, so maybe you
should ask him. :-)
There is another word, 'string', that is used in some of the other blocks. It
appears to be the Right Way to do this, along with a TYPE-like word, but it
isn't working out for me yet.
> make a word that works like ." except
> compile the display-inlined-packed-string
> subroutine followed by a packed counted string
> compiled into the cells that follow the
> subroutine call.
The current colorForth doesn't provide any easy way to write "parsing words",
as far as I can tell. Maybe if someone could create a simple example of how to
unpack characters, it would be helpful.
> I haven't played with your wiki pages. Perhaps it
> would be good if a wiki like archive for the mail
> lists could be created. This message will go out
> to all list members and then they have a copy but
> there is not an archive on the mail lists themselves
> anywhere.
Everyone is welcome to use my wiki. Edit the pages, add new pages, upload
files, whatever. It is currently focused on Quartus Forth, but if there is
sufficient interest, I wouldn't mind creating a ColorForth subwiki.
-- Kris
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
------------------------
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