Xbasic
INDEX.KEY_LIST_GET Function
Syntax
Key_List as C = Key_List_Get(N records[,N Step[,C format[,C match_prefix]]])
Arguments
- records
The number of keys to retrieve.
- Step
Optional. Default = 1. The interval between successive keys that are returned.
- format
Optional. An expression that includes either the "K" or "R" flags. The "K" flag is replaced with the key value. The "R" flag is replaced with the record number.
- match_prefix
Character
Description
Returns cr-lf separated list of keys from head or tail of index/query (direction depends on +/- records).
Discussion
The .KEY_LIST_GET() method returns a CR-LF delimited list of keys from the head or tail of the index or query. The direction depends on +/- records.
Example
dim t as P
dim i as P
dim keys as C
t = table.open("customer")
i = t.index_primary_put("Lastname")
keys = i.key_list_get(10, 1, "K : R" + crlf())
? keys
= Abrams : 31
Adams : 55
Baker : 0
Baker : 54
Barber : 51
Bernstein : 53
Boschetti : 17
Burtonski : 47
Cario : 7
Carr : 50See Also