Print Command

You can format and write data with the Print statement. Each of its arguments contains an expression and an optional format descriptor. A quote can also be included to write literal text.

A space is written between each argument and an end-of-line is written after writing the values. Options are available to suppress these features and provide additional controls. To keep things simple these details won't be described here.


The type of the data is inferred from variables in the expression. Expressions with conflicting variable types or expressions with only constants are not allowed. The optional Format can be quoted or left unquoted unless it contains special characters. When left off each primitive type uses a default format. Here are some simple examples for a variable, V, of type Word and set to 44.


You can also use the intrinsic Form function to return a formatted string:


To format a structure you can create a custom formatting function. It will be invoked when you print it or use the intrinsic Form function. In this example the fields for a point will be formatted when a variable with the type Point is printed.

When you print a point you will get output that looks like:

Do Loop

Trace Command