annotate scripts/deprecated/intwarning.m @ 10413:271c5262975b

deprecate intwarning
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 16 Mar 2010 12:29:49 +0100
parents scripts/miscellaneous/intwarning.m@7c211d0091d9
children 95c3e38098bf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8746
diff changeset
1 ## Copyright (C) 2008, 2009 David Bateman
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
2 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
3 ## This file is part of Octave.
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
4 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
8 ## your option) any later version.
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
9 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
13 ## General Public License for more details.
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
14 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
18
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
19 ## -*- texinfo -*-
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
20 ## @deftypefn {Function File} {} intwarning (@var{action})
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
21 ## @deftypefnx {Function File} {} intwarning (@var{s})
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
22 ## @deftypefnx {Function File} {@var{s} =} intwarning (@dots{})
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
23 ## Control the state of the warning for integer conversions and math
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
24 ## operations.
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
25 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
26 ## @table @asis
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
27 ## @item "query"
9810
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
28 ## With an output argument, return the current state of the integer
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
29 ## conversion and math warnings. With no output arguments, print the
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
30 ## current state.
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
31 ##
9153
5247e89688e1 Eliminate most overfull errors when running texi2pdf for generating pdf documentation
Rik <rdrider0-list@yahoo.com>
parents: 9051
diff changeset
32 ## @c Set example in small font to prevent overfull line
8516
e2a179415bac doc fixes
John W. Eaton <jwe@octave.org>
parents: 8039
diff changeset
33 ## @smallexample
e2a179415bac doc fixes
John W. Eaton <jwe@octave.org>
parents: 8039
diff changeset
34 ## @group
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
35 ## intwarning ("query")
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
36 ## The state of warning "Octave:int-convert-nan" is "off"
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
37 ## The state of warning "Octave:int-convert-non-int-val" is "off"
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
38 ## The state of warning "Octave:int-convert-overflow" is "off"
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
39 ## The state of warning "Octave:int-math-overflow" is "off"
8516
e2a179415bac doc fixes
John W. Eaton <jwe@octave.org>
parents: 8039
diff changeset
40 ## @end group
e2a179415bac doc fixes
John W. Eaton <jwe@octave.org>
parents: 8039
diff changeset
41 ## @end smallexample
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
42 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
43 ## @item "on"
9810
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
44 ## @itemx "off"
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
45 ## Turn integer conversion and math warnings on (or off). If there is
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
46 ## no output argument, then nothing is printed. Otherwise the original
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
47 ## state of the state of the integer conversion and math warnings is
7c211d0091d9 intwarning doc fix
John W. Eaton <jwe@octave.org>
parents: 9153
diff changeset
48 ## returned in a structure array.
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
49 ## @end table
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
50 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
51 ## The original state of the integer warnings can be restored by passing
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
52 ## the structure array returned by @code{intwarning} to a later call to
9036
58604c45ca74 Cleanup of data types related documentation
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
53 ## @code{intwarning}. For example
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
54 ##
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
55 ## @example
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 9036
diff changeset
56 ## @group
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
57 ## s = intwarning ("off");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
58 ## @dots{}
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
59 ## intwarning (s);
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 9036
diff changeset
60 ## @end group
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
61 ## @end example
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
62 ## @seealso{warning}
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
63 ## @end deftypefn
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
64
10413
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
65 ## Deprecated in v. 3.4
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
66
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
67 function y = intwarning (x)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
68
10413
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
69 persistent warned = false;
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
70 if (! warned)
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
71 warned = true;
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
72 warning ("Octave:deprecated-function",
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
73 "intwarning is obsolete and will be removed from a future version of Octave. Integer math no longer produces warnings. Supply your own checks if you need those.");
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
74 endif
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
75
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
76 return;
271c5262975b deprecate intwarning
Jaroslav Hajek <highegg@gmail.com>
parents: 9810
diff changeset
77
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
78 if (nargin != 1)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
79 print_usage ();
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
80 else
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
81 if (nargout > 0)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
82 y = warning("query", "Octave:int-convert-nan");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
83 y = [y; warning("query", "Octave:int-convert-non-int-val")];
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
84 y = [y; warning("query", "Octave:int-convert-overflow")];
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
85 y = [y; warning("query", "Octave:int-math-overflow")];
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
86 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
87 if (ischar (x))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
88 if (strcmpi (x, "query"))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
89 if (nargout == 0)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
90 __print_int_warn_state__ ("Octave:int-convert-nan");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
91 __print_int_warn_state__ ("Octave:int-convert-non-int-val");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
92 __print_int_warn_state__ ("Octave:int-convert-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
93 __print_int_warn_state__ ("Octave:int-math-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
94 printf("\n");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
95 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
96 elseif (strcmpi (x, "on"))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
97 warning ("on", "Octave:int-convert-nan");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
98 warning ("on", "Octave:int-convert-non-int-val");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
99 warning ("on", "Octave:int-convert-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
100 warning ("on", "Octave:int-math-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
101 elseif (strcmpi (x, "off"))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
102 warning ("off", "Octave:int-convert-nan");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
103 warning ("off", "Octave:int-convert-non-int-val");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
104 warning ("off", "Octave:int-convert-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
105 warning ("off", "Octave:int-math-overflow");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
106 else
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
107 error ("intwarning: unrecognized argument");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
108 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
109 elseif (isstruct(x))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
110 for fld = fieldnames (x)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
111 if (strcmp ("Octave:int-convert-nan") ||
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
112 strcmp ("Octave:int-convert-non-int-val") ||
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
113 strcmp ("Octave:int-convert-overflow") ||
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
114 strcmp ("Octave:int-cmath-overflow"))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
115 s = getfield (x, fld);
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
116 if (! ischar (s) || !(strcmpi("s","on") || strcmpi("s","off")))
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
117 error ("intwarning: unexpected warning state");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
118 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
119 warning (s, fld);
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
120 else
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
121 error ("intwarning: unrecognized integer warning %s", fld);
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
122 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
123 endfor
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
124 else
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
125 error ("intwarning: unexpected input");
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
126 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
127 endif
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
128 endfunction
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
129
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
130 function __print_int_warn_state__ (s)
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
131 fprintf ("The state of warning \"%s\" is \"%s\"\n",
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
132 s, warning ("query", s).state);
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
diff changeset
133 endfunction