curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1922] [Mantis 1958] WwI §6.14 contains an invalid code snippet #162

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : mattweiner

Description :

The main text of WwI §6.14 contains the following code in the explanation of the phrase "best route from (object) to (object) ... object":

The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room, using even locked doors]."

But this will not compile, because text substitutions cannot contain commas.

Steps to reproduce :

Test Chamber is a room.

Lodestone Room is west of Test Chamber.

The brass compass is in Test Chamber. The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room, using even locked doors]."

Additional information :

imported from: [Mantis 1958] WwI §6.14 contains an invalid code snippet
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-12T09:01:41+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
Confirmed.

Problem. You wrote '"The dial points quiveringly to [be [...] ne Room, using even locked doors]."' : but a substitution contains a comma ',', which is against the rules, because 'say' is a special phrase in which the comma divides items in a list of things to say, and so it loses its ordinary meanings.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
I'm not even sure what that error message refers to.

I see that Inform accepts say messages in the (archaically I6-ish) style:


say "Output: ", brass compass, " active!";

But I only discovered this by experimentation. I think it's undocumented and could reasonably be struck out.

Even if not, that use of the comma could be dropped when inside a text substutition. That would not break any existing code, since it's already illegal to write


say "Output: [brass compass, " active!"].";

...for at least two different reasons.

As I think I wrote on the feature site, the most natural use of the phrase-option comma would be


say "In the cabinet [list of the contents of cabinet, using the definite article, prefacing with is/are].";

This can't be done at present, but it would be possible if commas were allowed in text substitutions.

curiousdannii-testing commented 2 years ago

61eedb62875fc10070240916:

Closed via this commit:
https://github.com/ganelson/inform/commit/5bd8e03e873b0ce6b635f5c9a656037101d891ce