The Pascal SCAN function scans a range of memory, searching for a specified
target. This function takes the form:
SCAN (Limit, PEXPR, Source)
where Limit is the number of bytes scanned, PEXPR defines the target and
Source is the variable. The Pascal Language Manual on pp. 51-52 describe
this function in greater detail.
Use SCAN on any variable except file types. When scanning string S, for
example, specify Source as S[1] to avoid having SCAN look at the length
parameter stored in S[0], which usually yields an erroneous value.