4.2.6. Print Rule

[Tip]Description

The print rule is used for printing output from ASM programs to various buffers or to the code output view.

[Important]Syntax
PrintRuleAST ::= print ( OptBufferAST LogicalTermAST ) ;
               | println ( OptBufferAST LogicalTermAST ) ;

OptBufferAST ::= $empty   
               | VariableRefAST , 

The print rule contains an optional output buffer and a term to be printed.

[Note]Semantics

The print rule evaluates its argument term and prints the resulted value to corresponding output buffer or the Code Output View (if the optional buffer is not specified). The println rule adds a newline character to the output string in addition. If the buffer is not specified then the

[Caution]Constraints

Prior to calling rule, the output buffer should be initialized by a call to native function XXX.

Remark.  The print rule can be used for instance for code generation or for printing status messages.

Defined In:  simple rule

See Also:  log rule