NAME

print - display data on the screen

SYNOPSIS

print [ExprList][;]
? [ExprList][;]

DESCRIPTION

Print displays the values of the expressions in ExprList on the terminal.  ExprList is a list of numeric and/or string expressions, separated by commas, blanks, or semicolons.  Any string constants in the list must be enclosed in quotation marks.  If the ExprList is not present, a newline is output. 

The separators in the ExprList determine the formatting of the printed items in the list.  In general, each output line is divided into print zones of 14 spaces each. 

A comma causes the next value to be printed at the beginning of the next zone. 

A semicolon or space causes the next value to be printed immediately after the previous value. 

If the ExprList ends with a comma, semicolon, or spc or tab function, no newline is output and the next print statement begins printing on the same line, after spacing the appropriate amount.  If the ExprList ends otherwise, a newline is output and the cursor moves to the beginning of the next line. 

If the value to be printed requires more space than remains on the current line, a newline is output and the value is printed at the beginning of the next line.  If the value is longer than the defined WIDTH, printing wraps around and the printed output for the value is split between 2 or more lines. 

A space is always printed at the end of a number.  If the number is positive, it is preceded by a space.  If negative, it is preceded by a minus sign.  Any single-precision number that can be represented in fixed-point format using 7 or fewer digits as accurately as in floating point format are printed in fixed point or integer format. 

The question mark (?) is a synonym for print. 

EXAMPLE

The program
	n = 5
	print "n-squared", "n-doubled", "n-12"
	print n^2, n*2, n-12
	end
produces
	n-squared     n-doubled     n-12
	 25            10           -7 

SEE ALSO

print using, width

USAGE NOTES

? is always synonymous with print as contrasted with Microsoft BASIC where this is not always the case. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber