I had an idea for a small test command XALL. It’s not as universal as Juhana Leinonen’s Object Response Test, but it’s helped me make sure of what is described in my room, since “examine all” doesn’t work.
However, it ran into a very localized problem. Namely, in the code below, X (a local variable) is seen as a global.
Shouldn’t locals override globals? Or is there something about Inform I should know about, or should there be a warning? I’m aware that I can probably find better variable names, but all the same, there’s a variable name clash that’s resolved the opposite of what is expected. YALL works fine, but XALL examines Mister X.
Also, what’s the procedure for potentially reporting Inform bugs? What should I check before doing so (e.g. database of known/fixed bugs)? I’m a bit nervous about doing so, but all the same, I’d like to help, and just knowing something obscure is a compiler bug instead of my own fault helps me not get stuck.
[code]“mister-x” by andrew
Undescribed Glade is a room. Mister X is a person in Glade. flowers, trees, birds and bees are scenery in Glade.
instead of asking Mister X about: say “‘I’m just here as a disruptive example.’”
xalling is an action applying to nothing. understand the command “xall” as something new. understand “xall” as xalling.
carry out xalling:
repeat with X running through visible things:
say “[X]: [no line break]”;
try examining X;
the rule succeeds;
yalling is an action applying to nothing. understand the command “yall” as something new. understand “yall” as yalling.
carry out yalling:
repeat with y running through visible things:
say “[y]: [no line break]”;
try examining y;
the rule succeeds;[/code]
Thanks again!