Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000869Core InformModel worldpublic2012-02-24 19:542014-05-07 07:33
Assigned Tograham 
PlatformOSOS Version
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000869: Examining includes a spurious "the" if "to say the" is overridden
1. Provide a "to say the (p - sayable value)" that provides some additional text.
  Ex. To say the (p - sayable value): say "<[p]>".
2. Ensure there is something with a description.
  Ex. Coin is a thing. The description of the coin is "This is a coin."
3. Proceed into game.
4. Examine something with a description.
  Ex. x coin

The extra text in "the" is added to the description.
  Ex. <This is a coin.>

No extra text added to the description.
  Ex. This is a coin.
Minimal Source Text To Reproduce
"Bad The" by Kateye

To say the (p - sayable value): say "<[p]>".

Coin is a thing. The description of the coin is "This is a coin."

Test is a room. A coin is in test.

Test me with "x coin".
Additional InformationWork around:

Carry out examining something: instead say "[description of item described]".
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
Erzengel (reporter)
2012-02-24 22:31
edited on: 2012-02-24 22:49

A better work around:

The fixed standard examining rule is listed instead of the standard examining rule in the carry out examining rules.
Carry out examining (this is the fixed standard examining rule):
if the noun provides the property description and the description of the noun is not "":
say "[description of the noun][line break]";
now examine text printed is true.

mattweiner (reporter)
2012-02-25 10:02

Forum thread: [^]

See another proposed workaround here: [^]
EmacsUser (manager)
2012-02-27 10:23

I'm reluctant to call this an Inform bug. The compiler is certainly behaving as instructed, because the new say phrase is written to apply to all sayable values, which just turned out to be more than the author intended. And while the Standard Rules could be rewritten to avoid articles in all text substitutions, this would only reduce their legibility without eliminating the problem (many other extensions use the same coding pattern).

Felix's suggestion, I think, gets at the crux of the matter. Because the intent is to create new say phrases for custom kinds of values, the scope of the phrases should be pruned down to just those kinds. For instance, you might consider writing ``enumerated value'' in place of ``sayable value.''
mattweiner (reporter)
2012-02-27 10:41

Well, the issue is not so much that the rule applies to more sayable values than intended, it's that the Standard Rules include tokens like "[the description of the item described]" when no article is supposed to be intended. This means that "the" isn't always handled the same way in text substitutions, which in turn means that something that handles "the" uniformly in text substitutions yields inconsistent results.

This may well be a feature suggestion rather than a bug, though perhaps it would be a good idea to document the difference between "[the description of the item described]" and "[the list of things contained by the item described]". Anyway, the "enumerated value" fix should work OK for anything I'd need to do with this anytime soon. I suppose that if I run into more problems here I can post it on Uservoice.
EmacsUser (manager)
2012-02-27 11:32

Hmm, yes, I see your point that articles are inferred from the form of the substitution sometimes but not always, and that the Standard Rules depend on that behavior. Currently, the line between articles in substitutions mattering or not is drawn along kind boundaries, hence my comment. But if the line ought to be elsewhere or ought not exist, then we do have a bug. That's not something I know, nor is it my call to make, so I'll ask. (Even if the distinction is supposed to be where it is, we might have a documentation bug, as you point out.)
jmcgrew (administrator)
2012-03-31 20:43

Inform ignores "the" before an expression to allow more literate code, and also ignores it in a regular phrase definition, but not in a to-say phrase definition. So "[the X]" is parsed differently depending on whether "to say the (something matching X)" has been defined. Currently it's defined for objects and special case phrases ("[the list of...]" vs. "[list of...]"), but since it can be defined at any time for other kinds of value, every substitution with an ignored article has the potential to break.

I suggest removing the optional "the" from all substitutions in the Standard Rules, clarifying the manual to explain that articles are *always* significant in substitutions, and adding standard "the"/"a" phrases for sayable values. This will be a breaking change, but updating old code should be as easy as searching for "[the" and removing the article wherever you don't want to print it.
EmacsUser (manager)
2012-04-02 11:56

Then I'll confirm it.
graham (administrator)
2014-02-13 11:30

Well, I've made two changes to the Standard Rules (one of them indeed the standard examining rule), but to be honest I don't consider this a bug.

- Issue History
Date Modified Username Field Change
2012-02-24 19:54 Erzengel New Issue
2012-02-24 19:57 Erzengel Issue Monitored: Erzengel
2012-02-24 22:31 Erzengel Note Added: 0001590
2012-02-24 22:49 Erzengel Note Edited: 0001590 View Revisions
2012-02-24 22:49 Erzengel Note Edited: 0001590 View Revisions
2012-02-25 10:02 mattweiner Note Added: 0001591
2012-02-27 10:23 EmacsUser Note Added: 0001594
2012-02-27 10:23 EmacsUser Assigned To => EmacsUser
2012-02-27 10:23 EmacsUser Status new => feedback
2012-02-27 10:41 mattweiner Note Added: 0001595
2012-02-27 11:32 EmacsUser Note Added: 0001596
2012-03-31 20:43 jmcgrew Note Added: 0001635
2012-04-02 11:56 EmacsUser Note Added: 0001638
2012-04-02 11:56 EmacsUser Assigned To EmacsUser =>
2012-04-02 11:56 EmacsUser Reproducibility have not tried => always
2012-04-02 11:56 EmacsUser Status feedback => confirmed
2014-02-13 11:30 graham Note Added: 0002484
2014-02-13 11:30 graham Status confirmed => resolved
2014-02-13 11:30 graham Resolution open => fixed
2014-02-13 11:30 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker