[code]Open Field is a room.
Instead of jumping:
Say “‘[one of]Cats are cool.[or]I simply adore cats.[purely at random]’”;[/code]
Now, what is that line break doing right after [purely at random]?
[code]Open Field is a room.
Instead of jumping:
Say “‘[one of]Cats are cool.[or]I simply adore cats.[purely at random]’”;[/code]
Now, what is that line break doing right after [purely at random]?
Text ending in certain punctuation (. ! ?) has an implicit line break, and there’s an implicit paragraph break at the end of a rule. See §5.8.
Try moving the period out of the “one of… purely at random” construct.
Open Field is a room.
Instead of jumping:
Say "'[one of]Cats are cool[or]I simply adore cats[purely at random].'";
Edit: More explanation:
The intervening conditionals cause the pieces of the say statement to be treated as if they were in separate say statements.
The original version translates like this:
Instead of jumping:
say "'";
let n be a random number between 1 and 2;
if n is 1:
say "Cats are cool.";
otherwise:
say "I simply adore cats.";
say "'";
While the revised version is like this:
Instead of jumping:
say "'";
let n be a random number between 1 and 2;
if n is 1:
say "Cats are cool";
otherwise:
say "I simply adore cats";
say ".'";
Thanks for the refined explanation - this really good to know! I was initially thinking of this as just a little strange error. But to me, it’s big news that punctation inside a [one of] block can trigger line breaks.