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 - pickeval() evaluate a list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickeval()          Evaluate a list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical pickeval extern
   param value _LIST   pList, ;
         const untyped pFunction

 Arguments
   pList is the list to evaluate.
   pFunction is a pointer to a function which is executed with all
   items of the list.

 Return
   A logical indicating the success of operation.

 Description
   The pickeval() function evaluates a list by calling the given
   user function with all items in the list. The call back function must
   conform the following prototype:

   func logical <PickEvalFunc> proto
   param value _LIST pList, ;
         value uint  uItem

   where pList is a pointer to the list being evaluated, and
   uItem is the item index for the current invocation. The user
   function indicates by its logical return value if further
   processing is required.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   func logical PickEvalFunc static
   para value _SLIST pList, value uint uItem
   ? uItem, pickstr( pList, uItem )
   return( .t. )
   endfunc
   
   proc Test_pickeval
   vardef
      _SLIST pList
   enddef
   pList := ExampleList()
   ?
   pickeval( pList, PickEvalFunc )   // execute function with all items
   pickclear( pList )
   endproc

   proc main
   Test_pickeval()
   endproc

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