[colorforth] Dare I say ANS!
- Subject: [colorforth] Dare I say ANS!
- From: "Howerd Oakford" <howerd.oakford@xxxxxxxxxxxx>
- Date: Thu, 15 Jan 2004 13:22:33 -0000
Hi All,
I would like to make colorForth more standard. Some words make colorForth
uneccessarily difficult for someone used to more conventional Forths :
colorForth ANS/conventional
--------------------------------
- invert
copy blk @ swap copy
pad n/a
erase erases n blocks starting at blk @
mark gild
i i 1 -
?dup ????
accept ????
I think each word must be judged individually - how about :
rename - as invert
: negate invert 1+ ;
: - negate + ;
This restores compatibility. It is interesting to note that since "invert"
fits into 28 bits, source size is not affected.
rename pad as kpad:
It begins a list of words to execute for each key, so a ":" seems right.
: pad 2000 block ;
The old idea of pad is still useful, I think.
rename erase as bclr ( block clear )
: erase ... the usual loop ... ;
rename mark as gild ( do Forth, Inc. have copyright on that? ;)
Make i return an index from 0 to n-1 instead of 1 to n. I presume this was
intentional - does any one know why?
?dup - what is this?
accept - ditto -
use diferent names for these....
I think we should use whatever the ANS form is for 1@, 2@ etc ( c@ w@ I
think ).
Does anyone know if "port fetch" has an ANS name? polyForth uses INPUT and
OUTPUT, p@ and p! is fine by me.
Regards
Howerd
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com