Re: [colorforth] arrays in source
- Subject: Re: [colorforth] arrays in source
- From: "Howerd Oakford" <howerd.oakford@xxxxxxxxxxxx>
- Date: Sat, 27 Dec 2003 19:51:47 -0000
----- Original Message -----
From: "Mark Slicker" <maslicke@xxxxxxxxxxx>
To: <colorforth@xxxxxxxxxxxxxxxxxx>
Sent: Saturday, December 27, 2003 5:47 PM
Subject: Re: [colorforth] arrays in source
> On Sat, 27 Dec 2003, Howerd Oakford wrote:
>
> > Hi Mark & all,
> >
> > At last I have joined the colorForth mailing list...
>
> Welcome. :)
>
> >
> > I like your aray idea.
> > I particularly like the fact that you can extend the number tokens in
any
> > way that you like.
> > I presume that you are using colours 2 and 5 for this.
> > This will be quite simple to do when the editor has been ported to
> > colorForth...
>
> Yes, 2 and 5. It seems if you gave a few more bits to display type, you
> could represent other sequence objects like ASCII strings.
>
> I'm not sure where the idea is going, it occurred to me so I thought I
> would post it.
Ditto with my "blue class" idea.
> I'm convinced I need build more and more applications before I add or take
> away anything from colorForth.
Indeed.
> > Below is a more general and more complicated idea that I present for
> > discussion :
> >
> > I have been thinking about what I call a "blue class" :
> >
> > Token 1 : colour blue ( = 0x0D ), name of "class"
> > Token 2 : name of word to display parameter field
> > Token 3 : name of word to execute ( sort of "code field" ), plus a count
of
> > the number of tokens in the parameter field in the place of the colour
bits.
> > Token 4 ... n : parameter field.
> >
> > Perhaps "class" is not a good name - it implies CREATE ... DOES> - which
> > this is not.
> > The idea is that the editor uses token 2 to display the parameter field
(
> > could be a string ).
> > When the blue name is compiled it lays down a pointer to token 3.
> > When the blue name is executed it executes token 3 and uses the
parameter
> > field for data.
> >
> > Example :
> >
> > Token 1 : [blue] myname
> > Token 2 : dotquote
> > Token 3 : [ skip over the parameter field ] ( has count in place of
colour
> > bits )
> > Token 4 : [ the string to display ]
>
> Does this define a new word?
Only the blue word named "myname".
The idea is that this defines a named structure ( called "myname" ) which
has edit-time and compile time actions, and a default magenta variable type
of run-time action. It is a generalisation of what any colorForth token must
have - each of the actions above.
I have never liked CREATE .. DOES> . Can I say that in this mailing list????
;)
Some people think it is an essential part of Forth, but I think that it
makes the distance between concept and code greater.
Regards
Howerd
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com