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

Re: [colorforth] Dare I say ANS!


Hi Albert,

----- Original Message -----
From: "Albert van der Horst" <albert@xxxxxxxxxxxxxxxxxx>

> I am kind of an expert in ISO Forth (but I contributed a macro to
> easily express colorforth words in the assembler file once.)
> Knowing little of colorforth I will only comment on the ISO aspect.
>
> >
> > colorForth   ANS/conventional
> > --------------------------------
> > -                  invert
> I dislike INVERT because it very verbose, but it is ISO
> Is - a monadic ( a -- ) operator in colorforth?
Yes. "-" is ISO INVERT.

> > copy            blk @ swap copy
> There is no COPY in ISO, so you can define it to mean the same.
COPY has common usage in Forth, Inc. products. It takes two block numbers,
and copies one to the other.

> > pad             n/a
> PAD is in ISO
>
> > erase          erases n blocks starting at blk @
> This is not true. In fact the ISO ERASE is the same than in
> colorforth
Alas it is not. Perhaps you have a different colorForth to me?

> > mark          gild
> Don't know either word, but GILD is not ISO
GILD is also a Forth, Inc. word. I'm not sure whether MARKER deos the same
thing. It is certainly similar.
GILD defines the current dictionary state as the one which is restored by
EMPTY.

> > i                 i 1 -
> I doubt this. How can the current loop index be
> different from I. It is like saying Ilias was not written
> by Homer, but by a guy of the same name. (For the
> classic-impaired, we don't know anything of Homer, except
> that he wrote the Ilias.)
I wrote this before I understood how FOR ... NEXT worked.
"i" in each case returns the loop index, but FOR ... NEXT counts down from n
to 1, but DO ... LOOP counts up from 0 to n-1.
My conclusion was that "i" should not exist in colorForth.

> > ?dup          ????
> ?DUP is ISO
The colorForth word "?dup" should be renamed - it is not ISO ?DUP at all.

> > accept        ????
> ACCEPT is ISO, but there may be subtle differences.
Or not so subtle...

[snip]

> I hope that you don't have the illusion that this will make colorforth
> programs run on just any ISO system.
Of course not!
I am just trying to make it easier for someone who knows ANS Forth to use
colorForth without getting confused by words that have the same name but do
different things...
One day it might be nice to add an ANS Forth compatibility layer to
colorForth, but not the other way round ;)

Regards

Howerd


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