FetchQueue (get INI file queue entries)

Top  Previous  Next

 

FetchQueue( section, entry, queue, field [,field] [,field] )

FetchQueue

Adds a series of values from the INI file to a QUEUE.

section

A string constant, variable, EQUATE, or expression containing the INI file section name.

entry

A string constant, variable, EQUATE, or expression containing the INI file entry name.

queue

The label of the QUEUE to receive the values.

field

The label of the field in the QUEUE to receive the value. You must specify at least one field, and you may specify up to three fields.

The FetchQueue method adds a series of values from the INI file into the specified fields in the specified queue.

Implementation:

FetchQueue assumes multiple entry values of the form:

[section]

entry=ItemsInQueue

entry_n=value,optionalvalue,optionalvalue

for example:

[Users]

User=3

User_1=Fred,1

User_2=Barney,0

User_3=Wilma,1

Example:

UserQ   QUEUE

Name     STRING(20)

Auth     BYTE

       END

CODE

INIMgr.FetchQueue('Users','User',UserQ,UserQ.Name,UserQ.Auth)!get UserQ

!program code

INIMgr.Update('Users','User',RECORDS(UserQ))     !put UserQ count

LOOP i# = 1 TO RECORDS(UserQ)                    !put UserQ entries

 GET(UserQ,i#)

 INIMgr.Update('Users','User_'&i#,CLIP(UserQ.Name)&','&UserQ.Auth)

END