functions
- :
s =functions(fcn_handle)¶ Describe the function that fcn_handle refers to, as a structure.
A single function handle argument is required; anything else is an error. The returned structure s always carries the following fields:
- function
A text form of the target. For a named function this is its name; for an anonymous handle, which has no name, it is the source text of the function definition itself.
- type
A label classifying the handle. Its value is one of:
- anonymous
An anonymous function defined inline.
- private
A function that lives in a private directory.
- overloaded
A function that provides a class-specific overload of another function.
- simple
An ordinary function: a built-in or one defined in a program file.
- subfunction
A secondary function defined after the main function in a program file.
- nested
Set when the target is a function nested inside another.
- file
The path of the program file that implements the function. It is empty when the handle points at an anonymous or built-in function, neither of which has a backing file.
Depending on the kind of handle, further fields may also be present.
Warning:
functionsexists as a debugging aid. The exact set of fields and their contents may change between releases, so code should not be written to depend on this layout.