Page History
...
Select Mode | Meaning |
0 | No select list is active (disable the select) |
1 | Latent file select |
2 | Latent index select |
If a select condition is active, subsequent BASIC+ READNEXT statements will return record keys until the file has been exhausted. If no select list is active, a subsequent BASIC+ READNEXT statement will fall through its ELSE branch.
The select mode value is available to an BASIC+ program in the system variable @LIST.ACTIVE. If the SELECT call fails for any reason, the RECORD argument is passed back false, indicating to the system that no select list is active. @LIST.ACTIVE will also be set to false.
This BASIC+ program fragment illustrates the typical flow of a simple SELECT:
Code Block |
---|
SELECT FILE ; * establish "latent" select DONE = 0 LOOP READNEXT @ID ELSE DONE = 1 UNTIL DONE DO /* process the row */ REPEAT |