Next: , Previous: , Up: The Object Type   [Index]


8.2 Function Pointer Object Interfaces

__count

integer __count(object o);

is the number of parameters of the function referred by o.

__fid

integer __fid(object o);

is the type ID of the function referred by o.

__ftype

text __ftype(object o);

is the evaluation type name of the function referred by o. ‘__type’ will return the fully qualified (or function pointer) type of the function.

    o_form("~\n", __ftype(sin));
    o_form("~\n", __type(sin));

The program prints ‘real’ and ‘real (*)(real)’.

See Function Pointers.

__function

text __function(object o);

is the name of the function referred by o.

    real (*f)(real);

    f = sin;

    o_form("~\n", __function(sin));
    o_form("~\n", __function(f));

The program prints ‘sin’ twice.

See Function Pointers.

__pid

integer __pid(object o, integer i);

is the type ID of the i indexed parameter of the function referred by o (negative position indications are interpreted with respect to the end of parameters list).

__ptype

text __ptype(object o, integer i);

is the type name of the i indexed parameter of the function referred by o (negative position indications are interpreted with respect to the end of parameters list).


Next: Calling Objects, Previous: Generic Object Interfaces, Up: The Object Type   [Index]