Mercurial > octave
comparison libinterp/corefcn/variables.h @ 21272:987c1a79d33f
new set_internal_variable variant
* variables.h, variables.cc (set_internal_variable): Set a string
variable limited to a list of choices.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 16 Feb 2016 14:39:52 -0500 |
parents | 1473547f50f5 |
children | bcc30b45a225 |
comparison
equal
deleted
inserted
replaced
21271:7e67c7f82fc1 | 21272:987c1a79d33f |
---|---|
114 extern OCTINTERP_API octave_value | 114 extern OCTINTERP_API octave_value |
115 set_internal_variable (std::string& var, const octave_value_list& args, | 115 set_internal_variable (std::string& var, const octave_value_list& args, |
116 int nargout, const char *nm, bool empty_ok = true); | 116 int nargout, const char *nm, bool empty_ok = true); |
117 | 117 |
118 extern OCTINTERP_API octave_value | 118 extern OCTINTERP_API octave_value |
119 set_internal_variable (std::string& var, const octave_value_list& args, | |
120 int nargout, const char *nm, const char **choices); | |
121 | |
122 extern OCTINTERP_API octave_value | |
119 set_internal_variable (int& var, const octave_value_list& args, | 123 set_internal_variable (int& var, const octave_value_list& args, |
120 int nargout, const char *nm, const char **choices); | 124 int nargout, const char *nm, const char **choices); |
121 | 125 |
122 #define SET_INTERNAL_VARIABLE(NM) \ | 126 #define SET_INTERNAL_VARIABLE(NM) \ |
123 set_internal_variable (V ## NM, args, nargout, #NM) | 127 set_internal_variable (V ## NM, args, nargout, #NM) |