PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
List Functions
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax:  char far *GetListEntry( PCMD List, int index,
                                   flagType fRecurse );
           char far *ScanList( PCMD List, flagType fRecurse );
 
  Returns: ScanList returns a pointer to the next element. GetListEntry
           returns a pointer to the specified element. Both return NULL
           if there is no next or specified element.
 
  See:     ClearList, ForFile, GetListHandle, NameToFunc, SelectFiles,
           PWB Mgreplist Macro
 
     GetListEntry gets a specified element of a list. ScanList scans
     through each element in a list.
 
     GetListEntry accesses a list by the number of the element. The
     <List> is the list command (from NameToFunc). The <index> is the
     number of the entry to be returned.
 
     ScanList works like the strtok function in the C run-time library.
     The first time you call it, pass the PCMD of the list as <List>.
     Then continue calling it, passing NULL as <List> until NULL is
     returned. You cannot start scanning one list, then scan a second
     list, then return to the first. Scan to the end of the first list
     before scanning another list.
 
     Both GetListEntry and ScanList have an <fRecurse> argument that
     indicates whether to process nested lists. If <fRecurse> is true,
     the function returns each entry in each sublist. If <fRecurse> is
     false, sublist names are returned as strings with a @ prefix.
                                    -♦-