7017
|
1 ## Copyright (C) 1994, 1995, 1996, 1997, 1999, 2005, 2007 John W. Eaton |
2313
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
7016
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
2313
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
861
|
18 |
3301
|
19 ## -*- texinfo -*- |
|
20 ## @deftypefn {Function File} {} version () |
|
21 ## Return Octave's version number as a string. This is also the value of |
|
22 ## the built-in variable @code{OCTAVE_VERSION}. |
|
23 ## @end deftypefn |
861
|
24 |
2314
|
25 ## Author: jwe |
|
26 |
2311
|
27 function vs = version () |
861
|
28 |
|
29 if (nargin != 0) |
904
|
30 warning ("version: ignoring extra arguments"); |
861
|
31 endif |
|
32 |
|
33 vs = OCTAVE_VERSION; |
|
34 |
|
35 endfunction |
7411
|
36 |
|
37 %!assert(isstr (version ()) && strcmp (version (), OCTAVE_VERSION)); |
|
38 |
|
39 %!warning version (1); |
|
40 |