[z-machine] Different 1.1 proposal: put_prop and get_prop
Matthew T. Russotto
mrussotto@speakeasy.net
Wed, 6 Aug 2003 13:37:31 -0400
On Wednesday, August 6, 2003, at 03:43 AM, Cedric Knight wrote:
> On 06 August 2003 0:41, David Kinder <d.kinder@btinternet.com> wrote:
>
> But 1.0 does demand that a word operand is dealt with sensibly by
> @put_prop when the destination is a single byte, so why not deal with
> it sensibly when the destination is *longer* than the source? And at
> the moment @get_prop actually seems to mean 'get the property, except
> if it's longer than 2 bytes in which case return its length*256 plus
> the first byte of data'.
It means "get the property if it's 2 bytes or shorter". It says
nothing about what it should happen when it's longer than two bytes.
The ZIP behavior is presumably either the result of mimicking Infocom
behavior or of implementing get_prop in a similar way.
> OK then, how about keeping it illegal, but defining that the
> interpreter should display an error and halt, like Zoom (& gnusto) do?
> It would at least standardize things in such a way that made bugs
> detectable. I'd regard something which silently corrupts the object
> table as a bug.
Like many other things where this would be the ideal, there are too
many existing story files which (erroneously) depend on that behavior,
or at least non-failing behavior. Fine for a "strict" interpreter, not
good for the standard in general.