MantisBT - Core Inform
View Issue Details
0000617Core InformRelationspublic2011-03-15 14:532014-05-07 07:34
Ron Newcomb 
graham 
normalserioushave not tried
closedfixed 
x86WindowsXP
6G60 
6L02 
(serious) Compiler rejects valid code
0000617: "next step via..." and "number of steps via..." aren't implemented for values (but can be used with buggy results)
In the manual, 13.11. Indirect relations, we have:

   next step via (relation of values to values) from (object) to (object) ... object

and it's number-of friend. Are these supposed to be for Values or for Objects? (I was hoping for values, as I've a KOV to give to it.) If it's just objects, why is the relation listed as "of values to values", and if it's all values, why the the other parameters just objects? Other phrases like "list of (name of kind) to which (value) relates by (relation of values to values)" say values-to-values and actually mean it.

Not sure if this is a feature request or a documentation bug. Hopefully a bug in that the feature was supposed to be there anyway... :)
No tags attached.
related to 0000497closed graham "number of steps via" does not work for relations involving values 
Issue History
2011-03-15 14:53Ron NewcombNew Issue
2011-03-16 21:07jmcgrewNote Added: 0001095
2011-03-16 21:07jmcgrewSeveritymild => serious
2011-03-16 21:07jmcgrewStatusnew => acknowledged
2011-03-16 21:07jmcgrewSummarydoes "next step via..." and "number of steps via..." work for Values or just Objects? => "next step via..." and "number of steps via..." aren't implemented for values (but can be used with buggy results)
2011-03-16 21:09jmcgrewStatusacknowledged => confirmed
2011-08-20 10:35EmacsUserRelationship addedrelated to 0000497
2011-10-15 09:26grahamNote Added: 0001380
2011-10-15 09:26grahamStatusconfirmed => resolved
2011-10-15 09:26grahamResolutionopen => fixed
2011-10-15 09:26grahamAssigned To => graham
2014-05-07 07:34jmcgrewFixed in Version => 6L02
2014-05-07 07:34jmcgrewStatusresolved => closed

Notes
(0001095)
jmcgrew   
2011-03-16 21:07   
If object parameters are given, a cascade of I6 runtime errors results (at least on Z-code):

<code>
A color is a kind of value. The colors are red, orange, yellow, green, blue, indigo, and violet.

Cmatching relates various colors to various colors. The verb to cmatch (it cmatches, they cmatch, it is cmatching) implies the cmatching relation.

Red cmatches violet and orange.
Orange cmatches red and yellow.
Yellow cmatches orange and green.
Green cmatches yellow and blue.
Blue cmatches green and indigo.
Indigo cmatches blue and violet.
Violet cmatches indigo and red.

Home is a room.

When play begins:
let foo be the next step via the cmatching relation from the player to Home;
say foo.
</code>

Pathfinding is not supported for relations between values, but that may be intentional. This issue could be "Compiler rejects valid code" for the original example, and/or "Compiler accepts invalid code" or "Game compiles but misbehaves" for this one, and/or a feature request!
(0001380)
graham   
2011-10-15 09:26   
The better type-checking imposed to fix 0000497 also resolves this:

Problem. You wrote 'let foo be the next step via the cmatching relation from the player to Home', but 'cmatching relation' has the wrong kind of value: a relation of colors rather than a relation of objects.