Mercurial > octave-nkf
comparison examples/funcdemo.cc @ 7081:503001863427
[project @ 2007-10-31 01:08:14 by jwe]
author | jwe |
---|---|
date | Wed, 31 Oct 2007 01:09:28 +0000 |
parents | 4270ded9ddc6 |
children | 4295d634797d |
comparison
equal
deleted
inserted
replaced
7080:7e465260a48f | 7081:503001863427 |
---|---|
1 /* | 1 /* |
2 | 2 |
3 Copyright (C) 2007 John W. Eaton | 3 Copyright (C) 2006, 2007 John W. Eaton |
4 | 4 |
5 This file is part of Octave. | 5 This file is part of Octave. |
6 | 6 |
7 Octave is free software; you can redistribute it and/or modify it | 7 Octave is free software; you can redistribute it and/or |
8 under the terms of the GNU General Public License as published by the | 8 modify it under the terms of the GNU General Public License |
9 Free Software Foundation; either version 3 of the License, or (at your | 9 as published by the Free Software Foundation; either |
10 option) any later version. | 10 version 3 of the License, or (at your option) any later |
11 version. | |
11 | 12 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | 13 Octave is distributed in the hope that it will be useful, |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 14 but WITHOUT ANY WARRANTY; without even the implied warranty |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15 for more details. | 16 See the GNU General Public License for more details. |
16 | 17 |
17 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public |
18 along with Octave; see the file COPYING. If not, see | 19 License along with Octave; see the file COPYING. If not, |
19 <http://www.gnu.org/licenses/>. | 20 see <http://www.gnu.org/licenses/>. |
20 | 21 |
21 */ | 22 */ |
22 | 23 |
23 #include <octave/oct.h> | 24 #include <octave/oct.h> |
24 #include <octave/parse.h> | 25 #include <octave/parse.h> |
47 std::string fcn = args (0).string_value (); | 48 std::string fcn = args (0).string_value (); |
48 if (! error_state) | 49 if (! error_state) |
49 retval = feval (fcn, newargs, nargout); | 50 retval = feval (fcn, newargs, nargout); |
50 } | 51 } |
51 else | 52 else |
52 error ("funcdemo: expected string, inline or function handle"); | 53 error ("funcdemo: expected string,", |
54 " inline or function handle"); | |
53 } | 55 } |
54 return retval; | 56 return retval; |
55 } | 57 } |