Mercurial > hg > octave-lyh
comparison src/ov-float.cc @ 11129:0de5cc44e690
use gripe functions for NaN to logical and NaN to character conversions more consistently
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 21 Oct 2010 16:12:00 -0400 |
parents | 654fbde5dceb |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11128:9cb5c0b7b43b | 11129:0de5cc44e690 |
---|---|
102 octave_float_scalar::convert_to_str_internal (bool, bool, char type) const | 102 octave_float_scalar::convert_to_str_internal (bool, bool, char type) const |
103 { | 103 { |
104 octave_value retval; | 104 octave_value retval; |
105 | 105 |
106 if (xisnan (scalar)) | 106 if (xisnan (scalar)) |
107 ::error ("invalid conversion from NaN to character"); | 107 gripe_nan_to_character_conversion (); |
108 else | 108 else |
109 { | 109 { |
110 int ival = NINT (scalar); | 110 int ival = NINT (scalar); |
111 | 111 |
112 if (ival < 0 || ival > UCHAR_MAX) | 112 if (ival < 0 || ival > UCHAR_MAX) |