Topic variables and text in I7

The basic rule is:

  • If it’s in a table column named topic, it’s a topic
  • If it’s in an Understand … as … line, it’s a topic
  • If it’s being used as a noun in a description of an action, it’s a topic
  • Otherwise, it’s text

Converting a topic to text is impossible, which is understandable, because a topic is really an arbitrary parsing routine (I think I6 calls these “GPRs”) which can’t necessarily be printed in any meaningful way.

But converting a text variable to a topic is also supposed to be impossible, which doesn’t make sense, since it has a very reasonable interpretation (“match this literal text and nothing else”).

As with many of Inform’s weird quirks, there’s an easy but obscure workaround.

To swap in (t - text):
    try typing "[t]".

Since the double-quotes occur in the description of an action, they’re taken as a topic, and a topic can include references to a text in it, meaning “compare the snippet against this text variable”.