Difference between revisions of "SCOPE"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) (→Example) |
Yvonnemilne (Talk | contribs) (→Example) |
||
Line 26: | Line 26: | ||
use products order categoryid | use products order categoryid | ||
// Default current record | // Default current record | ||
− | display | + | display productid, productname |
+ | // All records | ||
+ | display all productid, productname | ||
// Default all records | // Default all records | ||
− | list | + | list productid, productname |
// Default, process rest of records from current position stopping when record | // Default, process rest of records from current position stopping when record | ||
// does not match the condition | // does not match the condition | ||
seek 2 | seek 2 | ||
list productid, productname while categoryid = 2 | list productid, productname while categoryid = 2 | ||
− | // First 10 records from top of file (indexed here) | + | // First 10 records from top of file (indexed order here) |
− | list first 10 | + | list first 10 productid, productname |
− | // Next 20 records from current position | + | // Next 20 records from current position (indexed order here) |
− | list next 20 | + | list next 20 productid, productname |
− | // Last 10 records (indexed here) | + | // Last 10 records (indexed order here) |
− | list last 10 | + | list last 10 productid, productname |
// Process all records, listing those that match the condition | // Process all records, listing those that match the condition | ||
− | list for supplierid = 1 | + | list productid, productname for supplierid = 1 |
</code> | </code> | ||
Revision as of 16:02, 3 September 2010
Template:YLM todo Recital supports the following scope ranges
Scope | Description |
---|---|
Default scope of the operation, e.g. FOR is all, WHILE is rest. | |
Next | Process next n records. Enter number of records to process, starting from current record. |
All | Process all records. |
Record | Process selected record. Enter the record number of the record to process. |
Rest | Process all remaining records, starting from current record. |
First | Process first n records. Enter number of records to process, starting from top of file. |
Example
open database southwind use products order categoryid // Default current record display productid, productname // All records display all productid, productname // Default all records list productid, productname // Default, process rest of records from current position stopping when record // does not match the condition seek 2 list productid, productname while categoryid = 2 // First 10 records from top of file (indexed order here) list first 10 productid, productname // Next 20 records from current position (indexed order here) list next 20 productid, productname // Last 10 records (indexed order here) list last 10 productid, productname // Process all records, listing those that match the condition list productid, productname for supplierid = 1