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 - pickcount() return the number of items in a list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickcount()         Return the number of items in a list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func uint pickcount extern
   param value _LIST pList

 Arguments
   pList is a list pointer.

 Return
   Number of list items.

 Description
   The pickcount() function returns the number of items currently stored
   in a list.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickcount
   // Initialize a list, and display its items
   vardef
      _SLIST pList
      uint   n
   enddef
   pList := pickinit()
   
   pickadd( pList, "One" )
   pickadd( pList, "Two" )
   pickadd( pList, "Three" )
   pickadd( pList, "Four" )
   pickadd( pList, "Five" )
   
   for n := 1 to pickcount( pList )
      ? pickstr( pList, n )
   next
   pickclear( pList )
   endproc

   proc main
   Test_pickcount()
   endproc

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