Re: [Code] Brainteaser

From: Martijn Schoemaker (
Date: 11/21/01

Mike Breuer wrote:

> Option 1:
> Conditionals are always evaluated left to right, except when operator
> precedence demands otherwise.

Good shot, might be that indeed the terms are evaluated left to right
(as indeed normally is the case). I dunno how the compiler handles
this with lazy evaluation (if it evaluates humanly from right to left,
and only lexically from left to right) but you can test it by trying.

if (!*str || !str) return;

and see if it still crashes.

It all kinda depends on the compiler.


------ WARNING: This signature contains a VIRUS ! -------

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST