The PROCREAD statement assigns the string value of the primary input buffer of the calling Proc to a variable.
Format
PROCREAD var THEN/ELSE statements END |
Parameter(s)
var |
Variable to be assigned the current value of the primary input buffer. |
THEN statements |
Executes statements if buffer is read successfully. |
ELSE statements |
Executes statements if program was not called by a Proc, or if the input buffer was empty. |
Description
The PROCREAD statement may be used to access the primary input buffer of a calling Proc. The SYSTEM(116) function can determine whether the program was called by a Proc. See SYSTEM Function for more information.
See PROCWRITE Statement for information about writing to the primary input buffer,
Example
In this application, the program DIALOUT should be called only by a Proc. If the program was called directly, an error message is printed and execution is stopped.
PROCREAD ARGUMENTS ELSE PRINT "ERROR! " PRINT "'DIALOUT' MUST BE CALLED FROM A PROC" ABORT END |
See Also