Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - pickfill() fill a string list with items http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickfill()          Fill a string list with items
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical pickfill extern
   param       _SLIST pList, ;
         value uint   uStart, ;
         value uint   uEnd, ;
         const char   cString

 Arguments
   pList is the list to manipulate.
   uStart is the first item index to fill.
   uEnd is the last item index to fill.
   cString is the string for filling the list.

 Return
   A logical indicating the success of operation.

 Description
   The pickfill() function fills a string list with items between the given
   index interval. The function does not change the size of the list.

   Note that the whole list is copied during the operation, the original list
   is cleared, and its pointer is replaced with the new list's pointer.
   This function can only be used with string lists, but not with generic
   lists that contain non-character data.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickfill
   vardef
      _SLIST pList
   enddef
   pList := ExampleList()
   ?
   pickfill( pList, 2, 5, "NEW ITEM" ) // replace items 2 to 5
   ShowList( pList )
   pickclear( pList )
   endproc

   proc main
   Test_pickfill()
   endproc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson