Yup. This trips up everyone at the start. An Inform 7 program is a series of assertions. The specifications of Definitions, To-Phrases, Rules, Timed-event-rules-with-At, When-a-scene-begins/ends are themselves assertions, but within those things you can’t have assertions; you must have one or more phrases.
So outside of Definitions, To-Phrases, Rules, Timed-event-rules-with-At, When-a-scene-begins/ends (it’d be nice if there were an agreed upon collective term for them… at least one place in the docs suggest the others could be considered special cases of rules, but a couple of different places say they shouldn’t be) you can have a sentence that acts as an assertion.
Mostly just because it flows better with natural language, let’s say instead of person has a truth state called...
we go with A person can be employed or unemployed.
It’s a lot nicer to write if p is employed
than if the employed of p is true
. Then we can assert, plainly:
The player is unemployed.
But while a plain sentence can be used as an assertion, it can’t (alone) be a phrase, but you can make it part of a Now
phrase:
To fire (p - a person):
Now p is unemployed.
To make things more fun, some verbs mean different things when used in assertions, imperative statements (“imperative” isn’t formal terminology from the docs; Ron Newcomb’s Inform 7 for Programmers uses it), and conditionals. For instance, “to have” in an assertion asserts something has a property. In a conditional, it tests whether a person either wears or carries something. But in an imperative, it means just “to carry”. In a conditional, if X holds Y is true if X wears Y, X carries Y, X contains Y, X supports Y, or X incorporates Y (i.e., Y is a part of X). In an assertion or an imperative it just means “carry”.
[ Edited: I had said “At-phrases” originally, but that’s misleading at best, so I replaced it with “Timed-event-rules-with-At”. And I had forgotten When-a-scene-begins/ends as another assertion whose body is one or more phrases. ]