Mercurial > octave
comparison src/defun-int.h @ 5102:b04b30d30c66
[project @ 2004-12-28 01:59:05 by jwe]
author | jwe |
---|---|
date | Tue, 28 Dec 2004 01:59:05 +0000 |
parents | 5e2c68946f30 |
children | 90a9058de7e8 |
comparison
equal
deleted
inserted
replaced
5101:9b1af8135ecd | 5102:b04b30d30c66 |
---|---|
90 check_version (OCTAVE_API_VERSION, #name); \ | 90 check_version (OCTAVE_API_VERSION, #name); \ |
91 install_dld_function (F ## name, #name, shl, doc); \ | 91 install_dld_function (F ## name, #name, shl, doc); \ |
92 return error_state ? false : true; \ | 92 return error_state ? false : true; \ |
93 } | 93 } |
94 | 94 |
95 // Define a builtin variable. | |
96 // | |
97 // name is the name of the variable, unquoted. | |
98 // | |
99 // defn is the initial value for the variable. | |
100 // | |
101 // protect is a flag that says whether it should be possible to give | |
102 // the variable a new value. | |
103 // | |
104 // eternal is a flag that says whether it should be possible to | |
105 // clear the variable. Most builtin variables are eternal, and | |
106 // cannot be cleared. | |
107 // | |
108 // chg_fcn is a pointer to a function that should be called whenever | |
109 // this variable is given a new value. It can be 0 if there is no | |
110 // function to call. See also the code in user-prefs.cc. | |
111 // | |
112 // doc is the simple help text for this variable. | |
113 | |
114 #define DEFVAR(name, defn, chg_fcn, doc) \ | |
115 DEFVAR_INTERNAL (#name, SBV_ ## name, defn, false, chg_fcn, doc) | |
116 | |
117 // Define a builtin constant `name' (which may be redefined, but will | |
118 // retain its original value when cleared) and also an alias to it | |
119 // called `__name__' (which may not be redefined). | |
120 | |
121 #define DEFCONST(name, defn, doc) \ | |
122 DEFCONST_INTERNAL (name, defn, doc) | |
123 | |
124 // This one can be used when `name' cannot be used directly (if it is | |
125 // already defined as a macro). In that case, name is already a | |
126 // quoted string, and the name of the structure must to be passed too. | |
127 | |
128 #define DEFCONSTX(name, sname, defn, doc) \ | |
129 DEFCONSTX_INTERNAL (name, sname, defn, doc) | |
95 | 130 |
96 // MAKE_BUILTINS is defined to extract function names and related | 131 // MAKE_BUILTINS is defined to extract function names and related |
97 // information and create the *.df files that are eventually used to | 132 // information and create the *.df files that are eventually used to |
98 // create the builtins.cc file. | 133 // create the builtins.cc file. |
99 | 134 |