Mercurial > hg > octave-thorsten
comparison src/pt-binop.cc @ 12822:46e0d66596f2
codesprint: Add test for do_braindead_shortcircuit_evaluation
* pt-binop.cc: Add test for do_braindead_shortcircuit_evaluation
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 16 Jul 2011 13:17:23 -0700 |
parents | 12df7854fa7c |
children | 5d18231eee00 |
comparison
equal
deleted
inserted
replaced
12821:8f58f087df7f | 12822:46e0d66596f2 |
---|---|
277 you should always use the @samp{&&} and @samp{||} operators.\n\ | 277 you should always use the @samp{&&} and @samp{||} operators.\n\ |
278 @end deftypefn") | 278 @end deftypefn") |
279 { | 279 { |
280 return SET_INTERNAL_VARIABLE (do_braindead_shortcircuit_evaluation); | 280 return SET_INTERNAL_VARIABLE (do_braindead_shortcircuit_evaluation); |
281 } | 281 } |
282 | |
283 /* | |
284 | |
285 %!test | |
286 %! x = 0; | |
287 %! do_braindead_shortcircuit_evaluation (0); | |
288 %! if (1 | (x = 1)) | |
289 %! endif | |
290 %! assert (x, 1); | |
291 %! do_braindead_shortcircuit_evaluation (1); | |
292 %! if (1 | (x = 0)) | |
293 %! endif | |
294 %! assert (x, 1); | |
295 | |
296 */ | |
297 |