GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
defun.h File Reference
#include "octave-config.h"
#include "defun-int.h"
Include dependency graph for defun.h:

Go to the source code of this file.

Macros

#define DEFALIAS(alias, name)
 Macro to define an alias for another existing function name. More...
 
#define DEFCONSTFUN(name, args_name, nargout_name, doc)   DECLARE_FUN (name, args_name, nargout_name)
 Macro to define a builtin function that cannot be hidden by a variable. More...
 
#define DEFCONSTMETHOD(name, interp_name, args_name, nargout_name, doc)   DECLARE_METHOD (name, interp_name, args_name, nargout_name)
 Macro to define a builtin method that cannot be hidden by a variable. More...
 
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)   DECLARE_METHOD (name, interp_name, args_name, nargout_name)
 Macro to define a builtin method. More...
 
#define DEFMETHODX(name, fname, interp_name, args_name, nargout_name, doc)   DECLARE_METHODX (fname, interp_name, args_name, nargout_name)
 Macro to define a builtin method with certain internal name. More...
 
#define DEFUN(name, args_name, nargout_name, doc)   DECLARE_FUN (name, args_name, nargout_name)
 Macro to define a builtin function. More...
 
#define DEFUNX(name, fname, args_name, nargout_name, doc)   DECLARE_FUNX (fname, args_name, nargout_name)
 Macro to define a builtin function with certain internal name. More...
 

Macro Definition Documentation

◆ DEFALIAS

#define DEFALIAS (   alias,
  name 
)

Macro to define an alias for another existing function name.

For detailed information, see Important Macros.

Parameters
aliasFor another existing function name.
nameThe name of the other existing function.
See also
DEFUN

Definition at line 211 of file defun.h.

◆ DEFCONSTFUN

#define DEFCONSTFUN (   name,
  args_name,
  nargout_name,
  doc 
)    DECLARE_FUN (name, args_name, nargout_name)

Macro to define a builtin function that cannot be hidden by a variable.

Warning
Consider to use DEFUN, unless you have good reason.

For detailed information, see Important Macros.

The function gets installed to the octave::symbol_table in a way, such that no variable is allowed to hide this function name.

Parameters
nameThe unqouted name of the function that should be installed on the octave::symbol_table and can be called by the interpreter. Internally, the function name is prepended by an F.
args_nameThe name of the octave_value_list variable used to pass the argument list to this function. If this value is omitted, the function cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this function is expected to produce from the caller. If this value is omitted, the function cannot access this number.
docTexinfo help text (docstring) for the function.
See also
DEFUN, DEFUNX

Definition at line 109 of file defun.h.

◆ DEFCONSTMETHOD

#define DEFCONSTMETHOD (   name,
  interp_name,
  args_name,
  nargout_name,
  doc 
)    DECLARE_METHOD (name, interp_name, args_name, nargout_name)

Macro to define a builtin method that cannot be hidden by a variable.

Warning
Consider to use DEFMETHOD, unless you have good reason.

For detailed information, see Important Macros.

The method gets installed to the octave::symbol_table in a way, such that no variable is allowed to hide this method name.

Parameters
nameThe unqouted name of the method that should be installed on the octave::symbol_table and can be called by the interpreter. Internally, the method name is prepended by an F.
interp_nameThe name of the octave::interpreter reference that can be used by this method. If this value is omitted, there is no access to the interpreter and one should use DEFCONSTFUN to define a function instead.
args_nameThe name of the octave_value_list variable used to pass the argument list to this method. If this value is omitted, the method cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this method is expected to produce from the caller. If this value is omitted, the method cannot access this number.
docTexinfo help text (docstring) for the method.
See also
DEFMETHOD, DEFMETHODX

Definition at line 199 of file defun.h.

◆ DEFMETHOD

#define DEFMETHOD (   name,
  interp_name,
  args_name,
  nargout_name,
  doc 
)    DECLARE_METHOD (name, interp_name, args_name, nargout_name)

Macro to define a builtin method.

For detailed information, see Important Macros.

Parameters
nameThe unqouted name of the method that should be installed on the octave::symbol_table and can be called by the interpreter. Internally, the method name is prepended by an F.
interp_nameThe name of the octave::interpreter reference that can be used by this method. If this value is omitted, there is no access to the interpreter and one should use DEFUN to define a function instead.
args_nameThe name of the octave_value_list variable used to pass the argument list to this method. If this value is omitted, the method cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this method is expected to produce from the caller. If this value is omitted, the method cannot access this number.
docTexinfo help text (docstring) for the method.
See also
DEFMETHODX, DEFCONSTMETHOD

Definition at line 135 of file defun.h.

◆ DEFMETHODX

#define DEFMETHODX (   name,
  fname,
  interp_name,
  args_name,
  nargout_name,
  doc 
)    DECLARE_METHODX (fname, interp_name, args_name, nargout_name)

Macro to define a builtin method with certain internal name.

Warning
Consider to use DEFMETHOD, unless you have good reason.

For detailed information, see Important Macros.

This macro can be used when name cannot be used directly (for example if it is already defined as a macro). In that case, name is already a quoted string (thus unaffected by macros), and the internal name of the method is given by fname.

Parameters
nameThe qouted name of the method that should be callable by the interpreter.
fnameThe internal unqouted name of the method. This internal name is by convention prepended by an F.
interp_nameThe name of the octave::interpreter reference that can be used by this method. If this value is omitted, there is no access to the interpreter and one should use DEFUNX to define a function instead.
args_nameThe name of the octave_value_list variable used to pass the argument list to this method. If this value is omitted, the method cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this method is expected to produce from the caller. If this value is omitted, the method cannot access this number.
docTexinfo help text (docstring) for the method.
See also
DEFMETHOD, DEFCONSTMETHOD

Definition at line 168 of file defun.h.

◆ DEFUN

#define DEFUN (   name,
  args_name,
  nargout_name,
  doc 
)    DECLARE_FUN (name, args_name, nargout_name)

Macro to define a builtin function.

For detailed information, see Important Macros.

Parameters
nameThe unqouted name of the function that should be installed on the octave::symbol_table and can be called by the interpreter. Internally, the function name is prepended by an F.
args_nameThe name of the octave_value_list variable used to pass the argument list to this function. If this value is omitted, the function cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this function is expected to produce from the caller. If this value is omitted, the function cannot access this number.
docTexinfo help text (docstring) for the function.
See also
DEFUNX, DEFCONSTFUN

Definition at line 53 of file defun.h.

◆ DEFUNX

#define DEFUNX (   name,
  fname,
  args_name,
  nargout_name,
  doc 
)    DECLARE_FUNX (fname, args_name, nargout_name)

Macro to define a builtin function with certain internal name.

Warning
Consider to use DEFUN, unless you have good reason.

For detailed information, see Important Macros.

This macro can be used when name cannot be used directly (for example if it is already defined as a macro). In that case, name is already a quoted string (thus unaffected by macros), and the internal name of the function is given by fname.

Parameters
nameThe qouted name of the function that should be callable by the interpreter.
fnameThe internal unqouted name of the function. This internal name is by convention prepended by an F.
args_nameThe name of the octave_value_list variable used to pass the argument list to this function. If this value is omitted, the function cannot access the argument list.
nargout_nameThe name of the int variable used to pass the number of output arguments this function is expected to produce from the caller. If this value is omitted, the function cannot access this number.
docTexinfo help text (docstring) for the function.
See also
DEFUN, DEFCONSTFUN

Definition at line 82 of file defun.h.