
functionp(3)          LPC Library Functions          functionp(3)

NNAAMMEE
       functionp() - determine whether or not a given variable is
       a function pointer, and if so what kind

SSYYNNOOPPSSIISS
       int functionp( mixed arg );

DDEESSCCRRIIPPTTIIOONN
       Return nonzero if `arg' is a function pointer and zero (0)
       otherwise.  Function pointers are variables of type 'func-
       tion' as indicated  in  the  documentation  for  the  type
       'function', for example:

       f = (: obj, func :);

       The  return  value  indicates the type of function pointer
       using  the  values  given  in  the  driver  include   file
       "include/origin.h".

       function               pointer               type    value
       ---------------------    -----    call_other          ORI-
       GIN_CALL_OTHER                 lfun           ORIGIN_LOCAL
       efun           ORIGIN_EFUN        simul_efun          ORI-
       GIN_SIMUL_EFUN functional          ORIGIN_FUNCTIONAL

       These  values are bit values; in addition, 1 will be added
       if arguments were included in the definition (for example,
       (: previous_object, -1 :) )

       To test if a function variable is an efun pointer:

       if (functionp(f) & ORIGIN_EFUN) ...

       to test if it is an efun or simul_efun:

       if  (functionp(f) & (ORIGIN_EFUN | ORIGIN_SIMUL_EFUN)) ...

       to test if it has args:

       if (functionp(f) & 1) ...

SSEEEE AALLSSOO
       mapp(3),  stringp(3),  pointerp(3),  objectp(3),  intp(3),
       bufferp(3), floatp(3), nullp(3), undefinedp(3), errorp(3),
       lpc/types/function

MudOS                       5 Sep 1994                          1

