| Chapter 21: Extensions |

| 21.21. Inform 6 grammar, actions and rules

Inform 6 grammar ("Verb" and "Extend") should not be used, unless there is no alternative: instead I7 equivalents should be given. But I6 actions can certainly be used, and indeed the Standard Rules use almost the whole gamut of I6 actions. They define actions using a convenient shorthand:

> Wearing is an action corresponding to Wear
> past participle worn
> applying to one thing
> - check -
> can't wear what's not clothing rule = WearSub_C1
> can't wear what's not held rule = WearSub_C2
> can't wear what's already worn rule = WearSub_C3
> - carry-out -
> standard wearing rule = WearSub_O1
> - report -
> standard report wearing rule = WearSub_R1.

The clause "corresponding to Wear" tells I7 to call the action "Wear", thus making it match the I6 action of the same name. The remainder constructs the three rulebooks for the action, supplying names for suitable rules and moreover giving the names of I6-defined routines which will carry them out. The five I6 routines named are the fragments of the old I6 library's "WearSub": for instance,

> [ WearSub_C3; if (noun has worn) { L__M(##Wear,3,noun); rtrue; } rfalse; ];

We can also create named rules corresponding to I6 routines like so:

> The time passes rule corresponds to routine TS4_R.

Previous | Contents | Next