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

Re: [colorforth] an observation



> > This syntax hides ; in else,  red words, every structure word  added to
> > colorforth.
>
> The only true statement in the message.  How fortunate, then, that
ColorForth
> has very few structure words in it.  I can only think of a couple:
>
>  * else
>  * Red-word
>
> At this time, I seriously cannot think of any other structure word in
> ColorForth.
   I can add any structure.   Does this sintax make  adding structures
harder?
>
> >  adds  test for "..."  in  ;  making  a  hidden word more complex.
>
> False.  The test for the previous '...' occurs only in the handler for red
> words.  It need not exist anywhere else, for it makes sense in no other
> context.
  If "... "  appears before "else" is  this a compiler error or a misuse of
of the word "..." ?
Oh,   I should use then instead.
The sintax rules is increasing.
Undetected sintax errors  posible.

>
> >  The else then  construct allows  complex structures to reside in one
word.
>
> True, as far as the if/else/then approach goes (and even then, it's not
THAT
> hard.  I've written four classical Forths, working on my fifth,
if/else/then
> really is one of the easiest things to get working).  But, how fortunate,
we're
> not talking about supporting if/else/then.
 Thank you for correcting me for jumping to that conclusion.   "... "   can
be used only before red words  not other  structures that I might make.
Have I got the rules correct yet?
> False as far as the original context of the discussion is concerned.  I
posted
> the code for implementing else.  In ColorForth, here it is:
>
>   macro else ; then forth
>   ^^^^^ ---- = ==== ^^^^^
>
> where ^ indicates a yellow word, - indicates a red word, and = indicates a
cyan
> word.  There she is, in all her simple glory.
  if else then  is  a sintax error  with the above definition. You are
correct.
>
> I can do it in ColorForth now.  Nothing is made more complex.  It does
make
> writing if statements easier and more compact, and perhaps most
importantly,
> the *intent* behind the software more obvious.
>
> > Does not force
> > factoring of  logic statements.
>
> False, on several accounts.
>
> 1) It uses the existing if/then infrastructure, it does not fundamentally
> change it.
>
> 2) You can just as easily abuse the if construct in ColorForth as you can
in
> classic Forth:
>
>  foo cond1 if action1 ; then con2 if cond3 if action2 ; then action3 ;
then
  This is a terminat or continue structure.  I can find my through  this
maze.
>  ---
>
> --
> Samuel A. Falvo II
>
>
> __________________________________

I like getting rid of ";"  but I don't like hiding a conditional exit in
every red word.
Posibly   structure words also.
Which words end?   red words, else ...
I know else does because you told me.

Robert Patten


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com