A rule header ends in a colon and inside the rule blocks individual lines end in semicolons. The last line ends in a period.
After pushing the button: [<-- colon]
say "I wonder what this button does."; [<-- semicolon]
now the machine is switched on; [<-- semicolon]
now the player is intrigued. [<-- period]
The last line is the only place inside a rule block where a period can end the line. It signifies that the rule ends, so placing it anywhere else will cause a compilation error.
The last line can also end in a semicolon, but then there has to be at least one empty line right after the rule. Empty lines aren't allowed inside rule blocks.
Declarations always end in a period (full stop).
The workshop is a room. A machine is in the workshop.
The period can be omitted if there is at least one empty line after the declaration, but it's advisable to always add the period to avoid errors when the empty line is accidentally deleted.
The period can be omitted if the line ends in a string that ends in punctuation.
The description of the machine is "What could it be?" [<-- period optional]
Instead of jumping:
say "Boing!" [<-- period optional]
Only a period can be omitted in this case, never semicolons or other punctuation.
There are three valid ways to write control blocks (if, while, ...) The first is the so called "begin-end" style:
Instead of pushing the button:
if the machine is switched on begin;
say "The machine is already running.";
otherwise;
say "You start the machine.";
now the machine is switched on;
end if.
Using this style all lines end in semicolons, except for the last line of the entire rule which ends in a period. Indentation is optional but recommended for clarity.
The second is the "colon-and-indent" style:
Instead of pushing the button:
if the machine is switched on: [<-- colon]
say "The machine is already running.";
otherwise: [<-- colon]
say "You start the machine.";
now the machine is switched on.
Using this style the if condition ends in a colon as well as the "otherwise" line. (For more information see chapter 11.7. in Writing With Inform.)
The third way is to use a comma to separate the condition and the phrase.
Check pushing the button:
if the machine is switched on, say "The machine is already running." instead.
This works only when the condition acts on exactly one phrase.