GNU Octave  9.1.0
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"

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   DEFUN
 
#define DEFCONSTMETHOD   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. 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 Macros.

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

Definition at line 160 of file defun.h.

◆ DEFCONSTFUN

#define DEFCONSTFUN   DEFUN

Definition at line 148 of file defun.h.

◆ DEFCONSTMETHOD

#define DEFCONSTMETHOD   DEFMETHOD

Definition at line 149 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 Macros.

Parameters
nameThe unquoted 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

Definition at line 111 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 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 quoted name of the method that should be callable by the interpreter.
fnameThe internal unquoted 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

Definition at line 144 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 Macros.

Parameters
nameThe unquoted 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

Definition at line 56 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 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 quoted name of the function that should be callable by the interpreter.
fnameThe internal unquoted 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

Definition at line 85 of file defun.h.