Mercurial > hg > octave-lyh
comparison src/ov-ch-mat.cc @ 5781:faafc2d98b8d
[project @ 2006-05-02 19:40:19 by jwe]
author | jwe |
---|---|
date | Tue, 02 May 2006 19:40:21 +0000 |
parents | ace8d8d26933 |
children | c20eb7330d13 |
comparison
equal
deleted
inserted
replaced
5780:cbf717bf8150 | 5781:faafc2d98b8d |
---|---|
55 double | 55 double |
56 octave_char_matrix::double_value (bool) const | 56 octave_char_matrix::double_value (bool) const |
57 { | 57 { |
58 double retval = lo_ieee_nan_value (); | 58 double retval = lo_ieee_nan_value (); |
59 | 59 |
60 // FIXME -- maybe this should be a function, valid_as_scalar() | |
61 if (rows () > 0 && columns () > 0) | 60 if (rows () > 0 && columns () > 0) |
62 { | 61 { |
63 // FIXME -- is warn_fortran_indexing the right variable here? | 62 gripe_implicit_conversion ("Octave:array-as-scalar", |
64 if (Vwarn_fortran_indexing) | 63 "character matrix", "real scalar"); |
65 gripe_implicit_conversion ("character matrix", "real scalar"); | |
66 | 64 |
67 retval = matrix (0, 0); | 65 retval = matrix (0, 0); |
68 } | 66 } |
69 else | 67 else |
70 gripe_invalid_conversion ("character matrix", "real scalar"); | 68 gripe_invalid_conversion ("character matrix", "real scalar"); |
77 { | 75 { |
78 double tmp = lo_ieee_nan_value (); | 76 double tmp = lo_ieee_nan_value (); |
79 | 77 |
80 Complex retval (tmp, tmp); | 78 Complex retval (tmp, tmp); |
81 | 79 |
82 // FIXME -- maybe this should be a function, valid_as_scalar() | |
83 if (rows () > 0 && columns () > 0) | 80 if (rows () > 0 && columns () > 0) |
84 { | 81 { |
85 // FIXME -- is warn_fortran_indexing the right variable here? | 82 gripe_implicit_conversion ("Octave:array-as-scalar", |
86 if (Vwarn_fortran_indexing) | 83 "character matrix", "complex scalar"); |
87 gripe_implicit_conversion ("character matrix", "complex scalar"); | |
88 | 84 |
89 retval = matrix (0, 0); | 85 retval = matrix (0, 0); |
90 } | 86 } |
91 else | 87 else |
92 gripe_invalid_conversion ("character matrix", "complex scalar"); | 88 gripe_invalid_conversion ("character matrix", "complex scalar"); |