strict

Causes the read or readln statement to compare a string read from the data file to a regular expression.

Syntax

read strict "regexp"

or

readln strict "regexp"

Comments

The strict modifier causes a read operation to perform the data transfer into a buffer, where it is compared to regexp. If the pattern in regexp exactly matches what is in the buffer, control passes to the next statement in the program block. Otherwise, a failure condition is generated.

The data in the buffer is discarded after the comparison.

Example

read strict "A\.R[0-9]"  // check the ID of an ADAMS data file