SELECTINFO()

SELECTINFO()

Top  Previous  Next

 

The SELECTINFO() function returns information about a select list.

 

 

 

Format

 

SELECTINFO(list.no, key)

 

SELECTINFO(var, key)

 

where

 

list.noevaluates to the number of the select list to be examined. If omitted, select list zero is used.

 

varis a select list variable.

 

keyidentifies the action to be performed.

 

 

Values for the key to the SELECTINFO() function are defined in the KEYS.H record in the SYSCOM file. These are

 

1

SL$ACTIVE

Returns True if the select list is active, False if it is not active.

2

SL$LEVEL

Returns the command processor level at which the list was created.

3

SL$COUNT

Returns the number of items remaining to be processed in the select list. If the list is not active, the SELECTINFO() function will return zero.

 

Use of mode 3 with a list constructed using the QMBasic SELECT statement on a dynamic file requires completion of the selection process and thus may reduce application performance.

 

 

Example

 

SELECT STOCK.FILE

PRINT "Stock file has " : SELECTINFO(0, SL$COUNT) : " records"

CLEARSELECT

 

This program fragment counts and reports the number of records in the file open with file variable STOCK.FILE.

 

 
See also:

Select lists