Mercurial > octave
annotate scripts/legacy/setstr.m @ 25720:e9f107d31799
warning_ids.m: Document new Octave:legacy-function warning.
* warning_ids.m: Document new Octave:legacy-function warning.
* setstr.m: Wrap some comments to 80 characters rather than 72.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 01 Aug 2018 12:42:03 -0700 |
parents | a3448e97ccc8 |
children | a0923a7878e3 |
rev | line source |
---|---|
25715 | 1 ## Copyright (C) 2003-2018 John W. Eaton |
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 {Function File} {} setstr (@var{s}) | |
25718
a3448e97ccc8
new scripts/legacy directory for Matlab functions that refuse to die
John W. Eaton <jwe@octave.org>
parents:
25715
diff
changeset
|
21 ## This function is obsolete. Use char instead. |
25715 | 22 ## @end deftypefn |
23 | |
24 ## Author: jwe | |
25 | |
25720
e9f107d31799
warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents:
25718
diff
changeset
|
26 ## At one time, Matlab docs stated that this function is obsolete and would be |
e9f107d31799
warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents:
25718
diff
changeset
|
27 ## removed in some future version. Now users are told that it should be |
e9f107d31799
warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents:
25718
diff
changeset
|
28 ## avoided, but there is no mention of possible future removal. |
25715 | 29 |
30 function retval = setstr (varargin) | |
31 | |
32 persistent warned = false; | |
33 if (! warned) | |
34 warned = true; | |
25718
a3448e97ccc8
new scripts/legacy directory for Matlab functions that refuse to die
John W. Eaton <jwe@octave.org>
parents:
25715
diff
changeset
|
35 warning ("Octave:legacy-function", |
a3448e97ccc8
new scripts/legacy directory for Matlab functions that refuse to die
John W. Eaton <jwe@octave.org>
parents:
25715
diff
changeset
|
36 "setstr is obsolete; please use char instead"); |
25715 | 37 endif |
38 | |
39 retval = char (varargin{:}); | |
40 | |
41 endfunction |