Rod Pemberton wrote:
[%X]
> So, you're contradicting yourself elsewhere. You're now saying that if
> someone implements COUNT where addr1 and addr2 are the same instead of
> different, it's entirely valid because "the external interface complies
> with
> the standard". That's what I said previously about such a COUNT ...
> I.e., there is no check in COUNT and no error checking mechanism in Forth
> to verify that COUNT's addr1and addr2 are actually different addresses.
I see no contradiction.
Consider the internal storage model of two versions of COUNT.
The first one takes the initial address extracts the first value as a count
of how many bytes are in the string and returns the address of where the
rest of the string is located.
The second version takes the address, reads the value from the location just
before the string and returns the address it was first passed as the start
of the string.
The effects of both versions are consistent with the interface specification
in the stack comments. However, they have two different storage models. Code
that uses COUNT would not care about which version was implemented as on the
same system, the activity would be self consistent.
> Anyway, by me asking why the supposedly standard compliant implementations
> are radically different, I was hoping to once again reinforce the notion
> of
> the importance of conformance testing. A standard by itself can be
> interpreted to mean just about anything, as everyone here has seen me do
> - validly I might add - quite a few times now... ;-)
The ANS standard described behaviour of the words as seen at their
interfaces (the stacks) except where it has been declared in the standard
that there are implementation variations that might make such behaviour
different.
--
********************************************************************
Paul E. Bennett...............<email://
Paul_E....@topmail.co.uk>
Forth based HIDECS Consultancy
Mob:
+44 (0)7811-639972
Tel:
+44 (0)1235-510979
Going Forth Safely ..... EBA.
www.electric-boat-association.org.uk..
********************************************************************