Equinox Online Help - Language Reference - A to Z

Home

Print

Applies to
SyntaxPrint Message1Expression [, Message2Expression][, Message3Expression] ...
Action[Statement] Displays information in the Print window.
ScopeUsable anywhere.
Notes

This statement prints the arguments (Message1Expression, etc) to an appropriate output device. By default, the output device used is the "Print window". The Print window is an independent window, which you can move, size and minimize. It appears when you use the Print statement and any subsequent Print statements appear in the same window. You may close the Print window manually, or change the output device using the PrintDevice statement.

You may add as many arguments as required, using commas or semi-colons as separators. A comma separator adds a space between expressions, whereas a single semi-colon does not. Two semicolons make Equinox begin a new line in the middle of the statement. Each Print statement starts printing on a new line, unless there is a comma or semi-colon on the end of the previous line.

If you print an array, you can optionally specify an extra delimiter to use between each element of the array. For example if you print an array x[3][2] using the statement:

Print x,;;

all six elements will be printed on one line with a space between each item and a new line at the end.

Array expressions require two delimiters: the first for between each element and the second for at the end of the array. If only one delimiter is supplied, it is used both in the middle and at the end.

This statement is intended primarily (but not exclusively) for debugging methods.

By default, output to the Print Window does not actually appear during a method until some form of user interaction occurs (for example, an Alert statement). The EnableInput statement allows you to change this behaviour.

CategoryDebugging
See Also Assert, Print, PrintDevice
Example

This example separates a string into sections each containing 10 characters. Each section is printed on a new line in the Print window.

for i = 1 To Len(txt) Step 10
Print Mid(txt, i, 10)
next

The next example prints details of a new order record. Note that all the details appear on one line.

for i = 1 To Len(txt)
Print Asc(txt[i]),
next

Print

The next example prints details of a new order record. Note that all the details appear on one line.

Print "Order taken on", OrdDate, "by", OrdInits,
Print "value = ";Str(OrdValue, , 2, 4)