25.2. The Standard Rules

| Chapter 25: Extensions |

| 25.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.

Previous | Contents | Next