basic.print

Statement/BASIC Program, Releases: AP and R83

Outputs expression to printer or crt.

Syntax

print {expression{,expression..}{:}

Description

directs output of an expression to the current output device.

If nothing follows the print statement, a blank line is output.

The 'print.list', if present, consists of any number of expressions, including '@' functions, separated by commas or colons.

If a comma follows a print expression, the string generated is formatted right justified in a field of 15 blanks and aligned at tab positions that are pre-set at every 18 character positions.

A colon at the end of the print.list inhibits the output of a return and scroll following output of the last printed line.

Example

print 'hello'

This statement outputs the literal string 'hello'. The quotes delimit
the literal string and are not printed.

message = 'hello'
print message

This statement outputs the contents of the variable 'message' to the
current active output device.

print message:' ':company.name

This statement outputs the results of a string expression made up of the
variables 'message' and 'company.name' and the literal
string space (' ').

print @(10,10):'the amount is ' : (unit.price * qty) 'r#12'

This statement positions the cursor at column 10, row 10 of the terminal
display, displays the literal string 'the amount is ', and outputs
the result of the arithmetic expression 'unit.price * qty' right
justified in a field of 12 characters.

See Also

Command Name Type Description
basic.statements Definition Definition of statements and functions.
basic.print.on Statement Directs output to specific report.
basic.masking.function Definition Performs formatting of output data values.
basic.crt Statement Outputs expression to crt.
basic.char Function Returns ASCII character of numeric expression.
basic.printer Statement Toggles crt/Spooler output or closes entry.
basic.@.functions Function Special cursor addressing functions.
basic.: Relational Operator Concatenation operator.
basic.cat Relational Operator Concatenates string expressions.
basic., Relational Operator Used to separate parameters in functions and to print tabstops with the 'print' and 'crt' statements.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.