Trouble with paragraph breaks

That’s interesting, I hadn’t clocked the -- running on syntax before.

As far as I can see from Basic Inform, including it in a say statement is the equivalent of a preceding [no line break] in substituted text:

To say no line break -- running on
	(documented at phs_nolinebreak):
	do nothing.

i.e. it is a signal to the compiler ‘If you were about to compile a hard-coded new_line statement at this point* don’t.’

*e.g. if the last character just printed was a period, question mark, or exclamation mark AND

  • this printing routine is about to finish OR
  • it’s about to go on to print other stuff from a separate routine (perhaps via a text substitution) without any intervening white space

EDIT: so

say "Hello.[no line break][interjection]".
To say interjection: say " How are you?".

is equivalent to:

say "Hello.[interjection]".
To say interjection -- running on: say " How are you?".

but this doesn’t work:

say "Hello.[interjection]".
To say interjection: say "[no line break] How are you?".

in the case of To say no line break -- running on: do nothing. the -- running on - prefaced [no line break] substitution prints nothing- it exists purely to send this ‘no hard-coded line break here’ signal to the compiler.

in the case of To say period -- running on: (- print "."; -). the text substitution [period] prints a period, but-- running on ensures that in the case of “Hello![period]” it is printed as

Hello!.

not

Hello!
.

Note that using I6 to print the substitution:
To say period: (- print "."; -).
is the thing that ensures a line break isn’t triggered AFTER the substitution, as would be the case for
To say period: say ".".
-- running on
is the thing that ensures a line break isn’t triggered by punctuation immediately BEFORE the substitution.

so there are four possible ways of defining say period: with or without using I6 and with or without using – running on, with the following possible results to, for example

say "Hello![period] How are you?[period] she said.[paragraph break]";
To say period: say "."
[line break before and after the substitution]

Hello!
.
How are you?
.
she said.

To say period -- running on: say "."
[line break after but not before the substitution]

Hello!.
How are you?.
she said.

To say period: (- print "."; -)
[line break before but not after the substitution]

Hello!
. How are you?
. she said.

To say period -- running on: (- print "."; -).
[no line break before or after the substitution]

Hello!. How are you?. she said.

EDIT

PS. for those with an aversion to I6 inclusions, you can achieve the same result with

To say period -- running on: say "[unicode 46]".

where the use of a say "[unicode 46]" substitution instead of say "." does the job of suppressing a line break AFTER [period],

4 Likes