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

 Syntax
   func uint pickid extern
   param value _LIST pList, ;
         value uint  uItem

 Arguments
   pList is a list pointer.
   uItem is a list item index.

 Return
   Item identifier number.

 Description
   The pickid() function returns the identifier number of the specified
   list item.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickid
   vardef
      _SLIST pList
      uint   n
   enddef
   pList := pickinit()
   for n := 1 to 5
      pickadd( pList, "hello" )   // add default identifiers using pickadd()
   next
   for n := 1 to 5
      ? pickid( pList, n )                // show id numbers
   next
   pickclear( pList )
   ?
   pList := pickinit()
   for n := 1 to 5
      pickaddid( pList, "hello", 10 - n ) // add explicit identifiers
   next                                   // using pickaddid()
   for n := 1 to 5
      ? pickid( pList, n )                // show id numbers
   next
   pickclear( pList )
   endproc

   proc main
   Test_pickid()
   endproc

See Also: pickaddid()

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