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 - pickdelete() delete an item from a list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickdelete()        Delete an item from a list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical pickdelete extern
   param       _LIST pList, ;
         value uint  uItem

 Arguments
   pList is the list to delete from.
   uItem is the item number to delete.

 Return
   A logical indicating the success of operation.

 Description
   The pickdelete() function deletes an item from a list. The size of the
   list decreases 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 be used with lists either containing string or generic
   data.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickdelete
   vardef
      _SLIST pList
      uint   n
   enddef
   pList := ExampleList()
   ?
   for n := 1 to 6
      pickdelete( pList, 1 )         // delete first 6 items
   next
   ShowList( pList )
   pickclear( pList )
   endproc

   proc main
   Test_pickdelete()
   endproc

See Also: picktrim()

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