Print()

The Print() rule sends information to the standard output, but differs from PrintRecord() in that the information to be printed must be specified.

Syntax

The Print(); statement uses following syntax.

Print ( string, [optional list of variables] );

At least two comma-separated arguments must be specified within the parentheses of Print(). The arguments can be any of the following: a list of strings enclosed in quotation marks (which may be empty), a string that is not enclosed in quotation marks (which may be a symbol definition name or may be NULL), an integer, or an eval statement.

Arguments

The following table lists the properties of the arguments of this stitcher rule.
Table 1. Arguments of Print()
Argument Description Accepts constants Accepts variables Accepts eval clauses
string Main part of the message to print out. Yes No No
optional list of variables If supplied, these variables will be appended to string in the output. Yes Yes Yes

Example

An example of the Print() rule that prints the current time to the standard output is shown below.

Print ( "CPU time:", eval (text, "$TIME") );
This example prints out stitcher start time.
text timeString = eval(text, $FTIME);
Print("This sticher is starting at time ", timeString);