Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C62127

Multiple assignment involving arrays
Submitted by: Roger Firth     Appeared in: Compiler 6.21 or before     Fixed in: Compiler 6.30
Problem

Multiple assignment involving pointer arithmetic doesn't work. For example:

theString->0 = theString->(Pointer-1) = $27;

Both bytes are being set to 4 (presumably Pointer-1) rather than to $27.

Update (by David Kinder)

This occurs only in Strict mode. The problem appears to be that the Strict mode array bounds check thinks it can clobber the contents of TEMP1, which in this case is already holding the constant $27. Or, possibly, that the multiple assignment code generation thinks TEMP1 is a safe location to store the assigned value, which isn't true here.

Solution

None submitted (but an easy workaround is to use two separate assignments).


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.