comparison src/ov-scalar.cc @ 5279:bd32f770c09a

[project @ 2005-04-12 21:55:31 by jwe]
author jwe
date Tue, 12 Apr 2005 21:55:31 +0000
parents e35b034d3523
children 4c8a2e4e0717
comparison
equal deleted inserted replaced
5278:fe23ec6763b7 5279:bd32f770c09a
104 104
105 return retval; 105 return retval;
106 } 106 }
107 107
108 octave_value 108 octave_value
109 octave_scalar::convert_to_str_internal (bool, bool) const 109 octave_scalar::convert_to_str_internal (bool, bool, char type) const
110 { 110 {
111 octave_value retval; 111 octave_value retval;
112 112
113 if (xisnan (scalar)) 113 if (xisnan (scalar))
114 ::error ("invalid conversion from NaN to character"); 114 ::error ("invalid conversion from NaN to character");
123 ival = 0; 123 ival = 0;
124 124
125 ::warning ("range error for conversion to character value"); 125 ::warning ("range error for conversion to character value");
126 } 126 }
127 127
128 retval = octave_value (std::string (1, static_cast<char> (ival))); 128 retval = octave_value (std::string (1, static_cast<char> (ival)), type);
129 } 129 }
130 130
131 return retval; 131 return retval;
132 } 132 }
133 133