Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 00004 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton 00005 00006 This file is part of Octave. 00007 00008 Octave is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU General Public License as published by the 00010 Free Software Foundation; either version 3 of the License, or (at your 00011 option) any later version. 00012 00013 Octave is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Octave; see the file COPYING. If not, see 00020 <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #if !defined (octave_defun_h) 00025 #define octave_defun_h 1 00026 00027 #if defined (octave_defun_dld_h) 00028 #error defun.h and defun-dld.h both included in same file! 00029 #endif 00030 00031 #include "defun-int.h" 00032 00033 // Define a builtin function. 00034 // 00035 // name is the name of the function, unqouted. 00036 // 00037 // args_name is the name of the octave_value_list variable used to pass 00038 // the argument list to this function. 00039 // 00040 // nargout_name is the name of the int variable used to pass the 00041 // number of output arguments this function is expected to produce. 00042 // 00043 // doc is the simple help text for the function. 00044 00045 #define DEFUN(name, args_name, nargout_name, doc) \ 00046 DEFUN_INTERNAL (name, args_name, nargout_name, doc) 00047 00048 // This one can be used when `name' cannot be used directly (if it is 00049 // already defined as a macro). In that case, name is already a 00050 // quoted string, and the internal name of the function must be passed 00051 // too (the convention is to use a prefix of "F", so "foo" becomes "Ffoo"). 00052 00053 #define DEFUNX(name, fname, args_name, nargout_name, doc) \ 00054 DEFUNX_INTERNAL (name, fname, args_name, nargout_name, doc) 00055 00056 // This is a function with a name that can't be hidden by a variable. 00057 #define DEFCONSTFUN(name, args_name, nargout_name, doc) \ 00058 DEFCONSTFUN_INTERNAL (name, args_name, nargout_name, doc) 00059 00060 // Make alias another name for the existing function name. This macro 00061 // must be used in the same file where name is defined, after the 00062 // definition for name. 00063 00064 #define DEFALIAS(alias, name) \ 00065 DEFALIAS_INTERNAL (alias, name) 00066 00067 #endif 00068 00069 /* 00070 ;;; Local Variables: *** 00071 ;;; mode: C++ *** 00072 ;;; End: *** 00073 */