comparison src/ov-base.cc @ 4732:b484cdca27be

[project @ 2004-02-04 04:32:48 by jwe]
author jwe
date Wed, 04 Feb 2004 04:32:48 +0000
parents ca3a1d687bba
children e44d0ac643a5
comparison
equal deleted inserted replaced
4731:176fcf62c464 4732:b484cdca27be
31 #include <climits> 31 #include <climits>
32 32
33 #include <iostream> 33 #include <iostream>
34 34
35 #include "lo-ieee.h" 35 #include "lo-ieee.h"
36 #include "lo-mappers.h"
36 #include "so-array.h" 37 #include "so-array.h"
37 38
38 #include "gripes.h" 39 #include "gripes.h"
39 #include "oct-map.h" 40 #include "oct-map.h"
40 #include "oct-obj.h" 41 #include "oct-obj.h"
258 error ("conversion of %g to " #T " value failed", d); \ 259 error ("conversion of %g to " #T " value failed", d); \
259 else if (d < MIN_LIMIT || d > MAX_LIMIT) \ 260 else if (d < MIN_LIMIT || d > MAX_LIMIT) \
260 error ("conversion of %g to short int out of range (%d, %d)", \ 261 error ("conversion of %g to short int out of range (%d, %d)", \
261 d, MIN_LIMIT, MAX_LIMIT); \ 262 d, MIN_LIMIT, MAX_LIMIT); \
262 else \ 263 else \
263 retval = static_cast<T> (d); \ 264 retval = static_cast<T> (fix (d)); \
264 } \ 265 } \
265 else \ 266 else \
266 gripe_wrong_type_arg ("octave_base_value::" #F "_value ()", \ 267 gripe_wrong_type_arg ("octave_base_value::" #F "_value ()", \
267 type_name ()); \ 268 type_name ()); \
268 \ 269 \
291 { 292 {
292 error ("conversion of NaN to integer value failed"); 293 error ("conversion of NaN to integer value failed");
293 return retval; 294 return retval;
294 } 295 }
295 296
296 retval = NINT (d); 297 retval = static_cast<int> (fix (d));
297 } 298 }
298 else 299 else
299 gripe_wrong_type_arg ("octave_base_value::nint_value ()", type_name ()); 300 gripe_wrong_type_arg ("octave_base_value::nint_value ()", type_name ());
300 301
301 return retval; 302 return retval;