Download OS-9 BASIC User Manual

Transcript
Chapter 12
Files and Unified Input/Output
Boolean Format
Syntax
Bwj
Function
Boolean format displays boolean data. The result of the boolean expression
is converted to the strings TRUE and FALSE. The w (field width) specifies
the total field size. If the string to display is shorter than the field size, it is
padded with spaces according to the justification mode. If it is too long, it
is truncated on the right side.
The justification modes are:
Mode:
Description:
<
Left justify (default if mode omitted)
>
Right justify
^
Center justify
Example
PROCEDURE booldemo
PRINT “IS 10<4 ?”
PRINT USING “B9>”, 10<4
PRINT “IS 4<10 ?”
PRINT USING “B9”, 4<10
END
RUN booldemo
IS 10<4 ?
FALSE
IS 4<10 ?
TRUE
12-24