ZMS 1.1’s description of the
@get_prop opcode (The Z-Machine Standards Document) says:
2OP:17 11 get_prop object property → (result)
Read property from object (resulting in the default value if it had no such declared property). If the property has length 1, the value is only that byte. If it has length 2, the first two bytes of the property are taken as a word value. It is illegal for the opcode to be used if the property has length greater than 2, and the result is unspecified.
Is there consensus on what should happen if the property requested is not legal for the object in question?
I’m specifically asking about the case where the property is valid, but not for that particular object, e.g. an individual property
pr that exists for an object
A but not for
B, where the instruction is
@get_prop B pr -> result.
In this case, there does not seem to be a legitimate “default value” to return.