Mercurial > hg > octave-nkf
annotate scripts/deprecated/usage.m @ 20410:d9f35ceff9e1
Change mkfifo to use an octal argument for MODE (bug #45054).
* NEWS: Announce switch from decimal to octal MODE for mkfifo.
* file-io.cc (convert): Add a FIXME note that this function is repeated in
* syscalls.cc.
* syscalls.cc (convert): New function to convert from one base to another.
* syscalls.cc (Fmkfifo): Change docstring to note that MODE argument is now
octal. Convert MODE from octal to decimal before calling octave_mkfifo().
Add BIST tests.
* __gnuplot_get_var__.m, __gnuplot_ginput__.m: Change instances of MODE
argument in m-files from decimal to octal.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 17 May 2015 10:04:08 -0700 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19842
diff
changeset
|
1 ## Copyright (C) 2014-2015 John W. Eaton |
19303 | 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 | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
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 | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
20 ## @deftypefn {Built-in Function} {} usage (@var{msg}) | |
21 ## | |
19842
ebd27d8c63fd
update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
19794
diff
changeset
|
22 ## @code{usage} is deprecated and will be removed in Octave version 4.4. |
19303 | 23 ## Please use @code{print_usage} in all new code. |
24 ## | |
25 ## Print the message @var{msg}, prefixed by the string @samp{usage: }, and | |
26 ## set Octave's internal error state such that control will return to the | |
27 ## top level without evaluating any more commands. This is useful for | |
28 ## aborting from functions. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19303
diff
changeset
|
29 ## |
19303 | 30 ## After @code{usage} is evaluated, Octave will print a traceback of all |
31 ## the function calls leading to the usage message. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19303
diff
changeset
|
32 ## |
19303 | 33 ## You should use this function for reporting problems errors that result |
34 ## from an improper call to a function, such as calling a function with an | |
35 ## incorrect number of arguments, or with arguments of the wrong type. For | |
36 ## example, most functions distributed with Octave begin with code like | |
37 ## this | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19303
diff
changeset
|
38 ## |
19303 | 39 ## @example |
40 ## @group | |
41 ## if (nargin != 2) | |
42 ## usage (\"foo (a, b)\"); | |
43 ## endif | |
44 ## @end group | |
45 ## @end example | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19303
diff
changeset
|
46 ## |
19303 | 47 ## @noindent |
48 ## to check for the proper number of arguments. | |
49 ## @seealso{print_usage} | |
50 ## @end deftypefn | |
51 | |
19842
ebd27d8c63fd
update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
19794
diff
changeset
|
52 ## Deprecated in version 4.0 |
19303 | 53 |
54 function retval = usage (varargin) | |
55 | |
56 persistent warned = false; | |
57 if (! warned) | |
58 warned = true; | |
59 warning ("Octave:deprecated-function", | |
60 "usage is obsolete and will be removed from a future version of Octave, please use print_usage instead"); | |
61 endif | |
62 | |
63 retval = __usage__ (varargin{:}); | |
64 | |
65 endfunction | |
66 |