Inform 7 Home Page / Documentation


§27.2. The Standard Rules

When any source text is run through Inform, a secret first line is inserted, which reads:

Include the Standard Rules by Graham Nelson.

The "Standard Rules" file contains the definitions of the basic kinds, phrases, actions and grammar described in this documentation: for instance, it includes lines like

A container is a kind of thing.

...without which Inform would be lost. Although including the Standard Rules is compulsory, it is treated internally as if it were any other "extension".

What happens when an "Include" sentence is reached is that the sentence is replaced with the whole text of the file in question, often many paragraphs long.

If the file has already been included, then the sentence is simply ignored. This is so that we can have two extensions, each of which needs the other: if A says to include B, and B says to include A, the result is that including one automatically includes the other, so we always get both which ever we ask for - not that there is a hideous infinite regress.


arrow-up.png Start of Chapter 27: Extensions
arrow-left.png Back to §27.1. The status of extensions
arrow-right.png Onward to §27.3. Built-in, installed and project-specific extensions