Syntax
BD>print : This is some text, followed by the value of this
constant: %fred is (%fred)
BD>print : This will not throw a carriage-return or line-feed $
The PRINT: command is used to output information
to the screen: headings, titles, general
information, and various numerical values. It has a special status in
[B/D] as the argument to the print: command is not parsed in the same
way as most of the other [B/D] commands. In fact parsing is limited to
the following exceptions.
is used to evaluate the value of the equation E, and to print this
value after text1 and before text2. Prior to
the determination of the equation, the text between the round brackets
is parsed in the usual way to remove redundant spaces, turn text to
lower case, and make any necessary substitutions for strings and
control variables. The value is output with a minimum width set by the
fwidth control, and to the number of decimal places specified by
the dplaces control.
BD>print : (3+2) is an equation "(but this is not),
which should produce the text ``5.0000 is an equation (but this is
not)'',
and
BD>print : ""See how we produce quotation marks"".
Otherwise, redundant spaces are not removed from the text in the
PRINT: command, and the case of the text is not changed. This
allows us to format text output nicely, capitalising wherever we want,
and so forth.
The second form of the syntax, where the text following the command is
terminated by the `$' symbol, supresses the carriage return and
linefeed usually output. This allows text from different PRINT:
statements to be output on the same line, as in the following example:
BD>if : %x | print : dog! | else : | print : ides of March!
where might be some constant taking values zero or one.
"
symbol. Any character succeeding a "
symbol is
printed literally. (So to output the "
symbol, you must use two
side by side.) Examples are: