PROCREAD Statement

Reads data from the Proc primary input buffer.

Syntax

PROCREAD variable [THEN statement(s) | ELSE statement(s)]

Syntax Elements

variable is the name of a variable to which the string value of the Proc primary input buffer is assigned.

statement(s) is either a THEN or ELSE clause (or both). A statement must be included. The THEN clause is executed upon a successful PROCREAD. The ELSE clause is executed if the program is not being run from a Proc.

Comment

This command is particularly useful if attribute marks are used as delimiters in the Proc, because variable can then be manipulated as a dynamic array.

Example

PROCREAD BUF ELSE
PRINT "MUST EXECUTE FROM PROC"
STOP
END

Assigns string value of Proc primary input buffer to variable BUF. The message is printed and the program terminated if program was not executed from a Proc.

Go to top button