annotate scripts/miscellaneous/version.m @ 20627:56333f6df823

ls.m: Produce listing with 1 file per line if nargout > 0 (bug #46002). HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Leave message empty to abort commit. HG: -- HG: user: Lachlan Andrew <lachlanbis@gmail.com> HG: branch 'default' * ls.m: Add '-1' to arguments on non-PC platforms so that file listing is one per line.
author Lachlan Andrew <lachlanbis@gmail.com>
date Fri, 09 Oct 2015 19:29:28 -0700
parents 4197fc428c7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19731
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19221
diff changeset
1 ## Copyright (C) 1994-2015 John W. Eaton
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
2 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
3 ## This file is part of Octave.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
4 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
8 ## your option) any later version.
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
9 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
13 ## General Public License for more details.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
14 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
17 ## <http://www.gnu.org/licenses/>.
861
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
18
3301
02866242d3ae [project @ 1999-10-20 04:10:46 by jwe]
jwe
parents: 2847
diff changeset
19 ## -*- texinfo -*-
02866242d3ae [project @ 1999-10-20 04:10:46 by jwe]
jwe
parents: 2847
diff changeset
20 ## @deftypefn {Function File} {} version ()
19221
b54093acb8fe ver.m: Overhaul function.
Rik <rik@octave.org>
parents: 17744
diff changeset
21 ## Return the version number of Octave as a string.
12208
9611014e7cf1 Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
22 ##
13929
9cae456085c2 Grammarcheck of documentation before 3.6.0 release.
Rik <octave@nomad.inbox5.com>
parents: 12345
diff changeset
23 ## This is an alias for the function @w{@env{OCTAVE_VERSION}} provided for
16806
ab0454713ded doc: Remove trailing characters after @seealso macro in version.m (bug #39307).
Rik <rik@octave.org>
parents: 14363
diff changeset
24 ## compatibility.
19221
b54093acb8fe ver.m: Overhaul function.
Rik <rik@octave.org>
parents: 17744
diff changeset
25 ## @seealso{OCTAVE_VERSION, ver}
3301
02866242d3ae [project @ 1999-10-20 04:10:46 by jwe]
jwe
parents: 2847
diff changeset
26 ## @end deftypefn
861
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
27
2314
949ab8eba8bc [project @ 1996-07-12 03:58:02 by jwe]
jwe
parents: 2313
diff changeset
28 ## Author: jwe
949ab8eba8bc [project @ 1996-07-12 03:58:02 by jwe]
jwe
parents: 2313
diff changeset
29
2311
2b5788792cad [project @ 1996-07-11 20:18:38 by jwe]
jwe
parents: 2303
diff changeset
30 function vs = version ()
861
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
31
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
32 if (nargin != 0)
904
3470f1e25a79 [project @ 1994-11-09 21:22:15 by jwe]
jwe
parents: 861
diff changeset
33 warning ("version: ignoring extra arguments");
861
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
34 endif
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
35
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
36 vs = OCTAVE_VERSION;
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
37
67eb44488be5 [project @ 1994-10-31 20:25:56 by jwe]
jwe
parents:
diff changeset
38 endfunction
7411
83a8781b529d [project @ 2008-01-22 21:52:25 by jwe]
jwe
parents: 7017
diff changeset
39
14363
f3d52523cde1 Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
40
f3d52523cde1 Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
41 %!assert (ischar (version ()))
f3d52523cde1 Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
42 %!assert (version (), OCTAVE_VERSION)
7411
83a8781b529d [project @ 2008-01-22 21:52:25 by jwe]
jwe
parents: 7017
diff changeset
43
83a8781b529d [project @ 2008-01-22 21:52:25 by jwe]
jwe
parents: 7017
diff changeset
44 %!warning version (1);
83a8781b529d [project @ 2008-01-22 21:52:25 by jwe]
jwe
parents: 7017
diff changeset
45