comparison src/ov-scalar.cc @ 5775:ace8d8d26933

[project @ 2006-04-24 19:13:06 by jwe]
author jwe
date Mon, 24 Apr 2006 19:13:11 +0000
parents 8d7162924bd3
children bd3041e30d97
comparison
equal deleted inserted replaced
5774:e7af222e98b0 5775:ace8d8d26933
60 60
61 if (idx.valid_scalar_indices ()) 61 if (idx.valid_scalar_indices ())
62 retval = scalar; 62 retval = scalar;
63 else 63 else
64 { 64 {
65 // XXX FIXME XXX -- this doesn't solve the problem of 65 // FIXME -- this doesn't solve the problem of
66 // 66 //
67 // a = 1; a([1,1], [1,1], [1,1]) 67 // a = 1; a([1,1], [1,1], [1,1])
68 // 68 //
69 // and similar constructions. Hmm... 69 // and similar constructions. Hmm...
70 70
71 // XXX FIXME XXX -- using this constructor avoids narrowing the 71 // FIXME -- using this constructor avoids narrowing the
72 // 1x1 matrix back to a scalar value. Need a better solution 72 // 1x1 matrix back to a scalar value. Need a better solution
73 // to this problem. 73 // to this problem.
74 74
75 octave_value tmp (new octave_matrix (matrix_value ())); 75 octave_value tmp (new octave_matrix (matrix_value ()));
76 76
140 { 140 {
141 int ival = NINT (scalar); 141 int ival = NINT (scalar);
142 142
143 if (ival < 0 || ival > UCHAR_MAX) 143 if (ival < 0 || ival > UCHAR_MAX)
144 { 144 {
145 // XXX FIXME XXX -- is there something better we could do? 145 // FIXME -- is there something better we could do?
146 146
147 ival = 0; 147 ival = 0;
148 148
149 ::warning ("range error for conversion to character value"); 149 ::warning ("range error for conversion to character value");
150 } 150 }