wmb@pi.Eng.Sun.COM (Mitch Bradley) (06/02/90)
The most recent ANS Forth meeting was held last week in Melbourne, FL.
Although the event was held at a Holiday Inn right on the beach, I don't
know of any committee member who actually even walked on the beach. We
were that busy!
Technical changes:
New words INCLUDE-FILE and INCLUDE for loading from text files.
INCLUDE takes filename from input stream, INCLUDE-FILE takes
file descriptor from stack. (Actually, these were voted in at the
last meeting, but failed to make it into Basis11 due to an editing
oversight).
"(" handles multi-line comments when loading from text files.
QUERY is extended to work also when loading from text input files
or from blocks. (It used to work only for keyboard input.)
Use of "/" is only portable when the arguments are positive.
New words "FM/MOD" and "SM/MOD" (analogous to the existing
"UM/MOD") allow the construction of portable programs which
need any (or even more than one in the same program) of the
common division semantics. An application is free to redefine
"/" in terms of "FM/MOD" or "SM/MOD" if it wishes.
New words "(E.)" and "(F.)" for conversion of floating point
numbers to strings, in either exponential or conventional notation.
New error handling wordset containing the words "CATCH" and
"THROW" for "non-local exits". Similar in purpose to C's
"setjmp(),longjmp()", but better ("CATCH" and "THROW" don't
require the allocation of global memory as do setjmp()/longjmp(),
and thus are nestable).
"KEY" now returns a character in the system's standard character
set, without any attribute bits or funny codes (e.g. function
keys). Thus, a standard program may use KEY and have some idea
what is likely to come back. Ditto for "?KEY".
New word "EKEY" (in Non-Portable Wordset) is provided for
applications which need to get attribute bits or funny codes.
Ditto for "?EKEY".
New word "SHIFT" performs logical shifts, left or right according
to the sign of the shift count.
New word "ENVIRONMENT?" for asking the system about system-dependent
parameters (e.g. presence of optional wordsets, size of data types
such as bits/cell, size of memory areas like the stack, etc). This
allows portable programs to configure themselves accordingly.
" (string literal) is allowed to work in interpret state, although
such usage is non-portable (because of concerns about the allocation
of a buffer to hold the string, and how long the string lasts before
the buffer gets overwritten by another string).
New word "LEX" (String wordset) for string parsing. Splits a string
around a delimiter character. The set of delimiter characters is
given by another string.
New word "PARSE" for input stream parsing. Similar to WORD except
that it does NOT skip leading delimiters, and the return value is
an "adr len" string instead of a counted string.
I may have forgotten something; hopefully the other committee members
on the net will fill in any gaps I have left.
Mitch Bradley