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

 Syntax
   func ulong pickudf extern
   param value _LIST pList

 Arguments
   pList is a list pointer.

 Return
   Address of the routine associated with the list, or 0 if no user-defined
   routine is installed.

 Description
   The pickudf() function returns the address of the routine associated
   with the passed list. User-defined functions can be installed via the
   picksetudf() function, to be used as the keyboard handler for the
   pickdisp() function.

   This function is normally used with string lists to be displayed via the
   pickdisp() function.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   func uint SetRec static
   param value _SLIST pList, value uint uStatus, uint uItemCurr
   // Custom keyboard handler
   @ 0, 70 ?? time()                 // display time
   return( PickKeyStd( pList, uStatus, uItemCurr ) )
   endfunc
   
   proc Test_pickudf
   vardef
      _SLIST pList
   enddef
   clear
   pList := pickinit()               // initialize list
   ? pickudf( pList ) == &SetRec     // prints .f.
   picksetudf( pList, &SetRec )      // set up the custom keyboard handler
   ? pickudf( pList ) == &SetRec     // prints .t. (address equals)
   pickclear( pList )                // clear list
   endproc

   proc main
   Test_pickudf()
   endproc

See Also: picksetudf()

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