Mercurial > hg > octave-lyh
annotate scripts/general/perror.m @ 12214:0ce4a9cd6a7f
Add accumdim function to documentation.c
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 29 Jan 2011 21:58:40 -0800 |
parents | fd0a3ac60b0e |
children |
rev | line source |
---|---|
11523 | 1 ## Copyright (C) 1993-2011 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/>. | |
245 | 18 |
3381 | 19 ## -*- texinfo -*- |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
7017
diff
changeset
|
20 ## @deftypefn {Function File} {} perror (@var{funcname}, @var{num}) |
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
7017
diff
changeset
|
21 ## Print the error message for function @var{funcname} corresponding to the |
3373 | 22 ## error number @var{num}. This function is intended to be used to print |
23 ## useful error messages for those functions that return numeric error | |
24 ## codes. | |
5642 | 25 ## @seealso{strerror} |
3373 | 26 ## @end deftypefn |
4 | 27 |
2314 | 28 ## Author: jwe |
29 | |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
7017
diff
changeset
|
30 function perror (funcname, num) |
4 | 31 |
32 if (nargin != 2) | |
6046 | 33 print_usage (); |
1577 | 34 else |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
7017
diff
changeset
|
35 printf (strerror (funcname, num)); |
4 | 36 endif |
37 | |
38 endfunction |