comparison src/ops.h @ 5533:667ad2becb63

[project @ 2005-11-10 21:40:48 by jwe]
author jwe
date Thu, 10 Nov 2005 21:40:49 +0000
parents 4c8a2e4e0717
children ce79d238f142
comparison
equal deleted inserted replaced
5532:8ad54ce6a831 5533:667ad2becb63
332 332
333 #define DEFCATOP_FN(name, t1, t2, f) \ 333 #define DEFCATOP_FN(name, t1, t2, f) \
334 CATOPDECL (name, a1, a2) \ 334 CATOPDECL (name, a1, a2) \
335 { \ 335 { \
336 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ 336 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
337 return octave_value (v1.t1 ## _value (). f (v2.t2 ## _value (), ra_idx)); \ 337 return octave_value (v1.t1 ## _value () . f (v2.t2 ## _value (), ra_idx)); \
338 } 338 }
339 339
340 #define DEFNDCATOP_FN(name, t1, t2, e1, e2, f) \ 340 #define DEFNDCATOP_FN(name, t1, t2, e1, e2, f) \
341 CATOPDECL (name, a1, a2) \ 341 CATOPDECL (name, a1, a2) \
342 { \ 342 { \
343 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ 343 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
344 return octave_value (v1.e1 ## _value (). f (v2.e2 ## _value (), ra_idx)); \ 344 return octave_value (v1.e1 ## _value () . f (v2.e2 ## _value (), ra_idx)); \
345 }
346
347 #define DEFNDCHARCATOP_FN(name, t1, t2, f) \
348 CATOPDECL (name, a1, a2) \
349 { \
350 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
351 \
352 return octave_value (v1.char_array_value () . f (v2.char_array_value (), ra_idx), \
353 true, ((a1.is_sq_string () || a2.is_sq_string ()) \
354 ? '\'' : '"')); \
345 } 355 }
346 356
347 // For compatibility, the second arg is always converted to the type 357 // For compatibility, the second arg is always converted to the type
348 // of the first. Hmm. 358 // of the first. Hmm.
349 359