procread statement

The procread statement reads the calling Proc’s primary input buffer and assigns its contents to a specified variable.

Syntax

procread var[then|else statement.block]

Parameter(s)

var Specifies the variable to receive the contents of the calling PROCs primary input buffer.

Description

When successful, the variable is treated as a string of characters delimited by spaces. The field() function can be used to parse the variable. The dcount() function can 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.

Example(s)

This is a sample Proc that prompts the operator for two dates.

pq
ri
s1
oenter beginning date +
ip
s2
oenter ending date +
ip
hrun bp this.program
p

This information can now be passed to the FlashBASIC or BASIC 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)