PROCREAD

PROCREAD


PRINTER ON Index Level PROCWRITE
Syntax PROCREAD variable [THEN | ELSE statement.block]
Category BASIC
Type Statement
Description reads the calling PROCs primary input buffer and assigns its contents to a specified variable.

When successful, the variable is treated as a string of characters delimited by spaces. The "field" function may be used to parse the variable. The "dcount" function may be used to determine the number of entries (number of spaces + 1) in the buffer variable.

The "else" condition is taken when the program has not been executed from a PROC.
Options
See Also THEN | ELSE statement.block statement.block statements & functions COUNT TCLREAD PROCWRITE ERROR FIELD
Example pq
ri
s1
oenter beginning date +
ip
s2
oenter ending date +
ip
hrun bp this.program
p

This is a sample PROC which prompts the operator for two dates. This information can now be passed to the FlashBASIC program "this.program".

this.program
001 procread buffer else
002   print 'this.program must be run from a PROC'
003   stop
004 end
005 start.date = field(buffer,' ',1)
006 end.date   = field(buffer,' ',2)
Warnings
Compatibility D3 7.0 AP R83
PRINTER ON Index Level PROCWRITE