MantisBT - Core Inform
View Issue Details
0000076Core InformTablespublic2010-06-20 00:372010-07-04 16:27
soukie 
graham 
normalmildalways
closedfixed 
Windows
6E59 
6E72 
(serious/mild) Game compiles but misbehaves
0000076: Self-referential constant lists don't work in tables defining a kind of value
The output is:
Followers: , M: 3. Number of followers: -1

The number of 'followers' should be 2 and the entries should be
accessible to various operations such as "let candidates be followers
corresponding to a subject of .... in the Table of TestSubjects"
Subject is a kind of value. The subjects are defined by the Table of
TestSubjects.

Table of TestSubjects
Subject Followers Mass
subjA {subjA, subjB} 3
subjB {subjB} 5

Testlab is a room.
When play begins, say "Followers: [Followers of subjA], M: [mass of
subjA]. Number of followers: [number of entries of followers of
subjA]".
In the previous build, submitter used a conversation system based on a table defined in this fashion:

<code>
Subject is a kind of value. The subjects are defined by the Table of
Existing Subjects.

Table of Existing Subjects
Subject Subject Title Followers Quip Availability Discussed
n "n" {n} "none" true true
</code>

With 6E59, submitter was unable to come up with a syntax to interact with the 'Followers' lists defined for the Subject values at all.
No tags attached.
Issue History
2010-06-20 00:37jmcgrewNew Issue
2010-06-20 00:37jmcgrewProduct Version => 6E59
2010-06-20 00:37jmcgrewTarget Version6E59 =>
2010-06-20 00:44jmcgrewNote Added: 0000064
2010-06-20 00:44jmcgrewReproducibilityhave not tried => always
2010-06-20 00:44jmcgrewStatusnew => acknowledged
2010-06-20 00:44jmcgrewOS => Windows
2010-06-20 00:44jmcgrewStatusacknowledged => confirmed
2010-06-20 15:33grahamNote Added: 0000100
2010-06-20 15:33grahamStatusconfirmed => resolved
2010-06-20 15:33grahamResolutionopen => fixed
2010-06-20 15:33grahamAssigned To => graham
2010-06-30 18:07jmcgrewFixed in Version => 6E72
2010-07-01 23:07jmcgrewStatusresolved => closed
2010-07-04 16:27jmcgrewReporterjmcgrew => soukie

Notes
(0000064)
jmcgrew   
2010-06-20 00:44   
The code above doesn't seem to work in 5Z71 either.
(0000100)
graham   
2010-06-20 15:33   
In fact the self-reference wasn't the problem here, tricky as it looks; it was to do with how Inform handles literal list constants. These require adaptation from their compiled state to their dynamic state, and Inform was performing this adaptation twice on the entries in the "followers" column - once because it knew they were list constants in a table column; once because it knew they were list constants in a property value. The second and redundant adaptation process corrupted the data and resulted in an empty list. Fixed.