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 - pickinsert() insert a new item in a string list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickinsert()        Insert a new item in a string list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical pickinsert extern
   param       _SLIST pList, ;
         value uint   uItem, ;
         const char   cString

 Arguments
   pList is the list to manipulate.
   uItem is the list index after which the new item is inserted.
   cString is the character string to add to the list.

 Return
   A logical indicating the success of operation.

 Description
   The pickinsert() function inserts a new string item at a given position
   of a list. The size of the list grows by one after the call.

   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_pickinsert
   vardef
      _SLIST pList
   enddef
   pList := ExampleList()
   ?
   pickinsert( pList, 1, " 0 This is a list of months" )    // insert item
   ShowList( pList )
   pickclear( pList )
   endproc

   proc main
   Test_pickinsert()
   endproc

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