Difference between revisions of "SCAN"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=SCAN=
 
 
 
 
==Class==
 
==Class==
 
Applications
 
Applications
Line 33: Line 30:
 
<code lang="recital">
 
<code lang="recital">
 
scan all for code = "HMT"
 
scan all for code = "HMT"
display name, address
+
    display name, address
 
endscan
 
endscan
 
</code>
 
</code>

Revision as of 13:02, 26 May 2009

Class

Applications


Purpose

Perform list of commands interactively


Syntax

SCAN [<scope>] [FOR <condition>] [WHILE <condition>]

[EXIT]

[LOOP]

ENDSCAN


See Also

CONTINUE, DO WHILE, IF, LOCATE


Description

The SCAN ... ENDSCAN command executes a list of commands repeatedly for a specified selection of records while an optionally specified condition is true, or until an EXIT is encountered. The optional LOOP keyword forces control to the beginning of the SCAN.

The SCAN...ENDSCAN command can be used to reduce the programming involved in a LOCATE ... DO WHILE ... CONTINUE construct.


Example

scan all for code = "HMT"
    display name, address
endscan


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer