|Anonymous | Login | Signup for a new account||2019-11-17 22:15 PST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002103||Core Inform||Phrases and functional programming||public||2019-07-09 09:13||2019-07-11 10:48|
|Target Version||Fixed in Version|
|Summary||0002103: Condition code generated as self == self|
|Description||I managed to write a condition, "if the number of things the actor is touching is greater than the number of arms of the actor" that Inform compiled into i6 as (self == self). "The number of arms" is a property of people, and "touching" is a various-to-various relation. A minimal reproduction is attached.|
I was able, after consulting with a friend, to rewrite the condition into "if the number of things touched by the actor is the number of arms of the actor:" but I believe the original statement should either work or be a parser error—the current behavior, always being true, seems like a pretty definite bug.
|Minimal Source Text To Reproduce|
"2019-07-08 cond bug" by nightpool The Example room is a room. In the example room is a candle, a book, and a bell. A person has a number called the number of arms. The number of arms of a person is usually two. Touching relates various people to various things. The verb to touch means the touching relation. Carry out an actor touching: now the actor touches the noun. Check an actor touching (this is the can't touch more things then hands rule): [if the number of things touched by the actor is the number of arms of the actor:] if the number of things the actor is touching is greater than the number of arms of the actor: If the actor is the player, say "You only have [number of arms of the actor] hands! You're currently touching [(list of things that the actor relates to by the touching relation) with definite articles]"; stop the action. test me with "touch the candle / touch the bell / touch the book / relations"
|Additional Information||This is the snippet of relevant i6 output:|
! [2: if the number of things the actor is touching is greater than the number of arms of the actor]
if (((self == self)))
P.S. If anyone knows a better way to write "[(list of things that the actor relates to by the touching relation) with definite articles]", I'm all ears, the current phrasing seems very clunky to me.
|Tags||No tags attached.|
|Effect||(serious/mild) Game compiles but misbehaves|
|I believe the problem is that "the number of things the actor is touching" is not a meaningful expression. The compiler must be going down some garden path trying to parse it.|
|2019-07-09 09:13||nightpool||New Issue|
|2019-07-11 10:48||zarf||Note Added: 0004872|
|Copyright © 2000 - 2010 MantisBT Group|