Sorry, two questions so quickly together! I am so demanding…
Anyway, struggling with syntax on this one, and can’t find any examples, but, with the following:
Check some_action:
if the <condition>, say "Some text!" instead;
if the <condition], say "Some other text!." instead;
if <condition>
begin;
say "Yet more text";
now the variable of the player is 1;
end if instead.
I’ve tried many many various combinations of that last ‘instead’. The first two work fine, and avoid the Carry out and Reporting parts…that last bit compiles, but still kicks into Carry Out…
What’s the syntax for including multiple statements within an if…instead construct?
Sorry! Got it…bit of trial and error, this one on my part
For the record:
Check some_action:
if the <condition>, say "Some text!" instead;
if the <condition], say "Some other text!." instead;
if <condition>
begin;
say "Yet more text";
now the variable of the player is 1 instead;
end if.
n.b. I think my lengthy attempts were down to the fact that my first guess “end if instead.” actually compiled
The “instead” modifier can’t be used on a block statement like “if” or “while”. (The compiler seems to accept it but thinks that you’re starting a new rule, which is not what you want.)