SELECTINFO()

Top  Previous  Next

 

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

 

 

 

Format

 

SELECTINFO(list.no, key)

 

where

 

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

 

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 (1) if the select list is active, false (0) if it is not active.

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..