> - We want to allow that behaviour of INCLUDE along with
> behaviour that does not change the BASE (since both variants
> have existing practice). That would result in adding, e.g,
> the following to the definition of INCLUDE:
>
> "An ambiguous condition exists if the value of BASE is not
> (decimal) ten."
Seems good enough, although a statement that it is legal just to
select DECIMAL would be more direct. As a side note, the MPE
standard source file template includes the lines:
only forth definitions
decimal
at the start, and
decimal
at the end. Bugs caused by BASE assumptions can be very hard to
find.
> - We do not want to allow this behaviour and keep the spec as
> it is. IMO it is confusing if INCLUDE silently changes BASE and
> INCLUDED does not. Which systems have this behaviour, and
> are the maintainers willing to change it?
I don't know. At present we do not do it.
> Just checking: INCLUDED in MPE's Forth systems has done
> something to the dictionary that did not come from the included
> file?
We keep a linked list of included file names. This behaviour is
the default, but can be disabled. Nobody has ever complained
about it. I certainly would not get Willem at CCS to agree with
a commitment to contiguity of data space at the start/end of
INCLUDED. The functionality given by persistent storage of
source file information is just too useful. I have only seen one
occasion in which source code has been affected by the
dictionary being non-contiguous across INCLUDE or INCLUDED.
: parser ... ;
create AsmTable
include opcodes.def
: parser ... ;
create DasmTable
include opcodes.def
: parser ... ;
create SimTable
include opcodes.def
The pain caused by this restriction was not enough to consider
changing the implementation.
> With both Win32Forth and MPE doing this without any complaints, I
> guess there is a pretty strong case for adding this restriction:
> system implementors have found it useful, and programmers have
> not had problems with it.
Just add that HERE may change, or is the term
"data space may not be contiguous"
more in line with the current wording.
Stephen
--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeforth.com - free VFX Forth downloads