On Thu, 12 Apr 2001, William Chops Westfield wrote: > >> I'm presuming the compiler will compile this such that any one function > >> returning a fail will immediately cause the function to return false > >> without calling any further functions. Is this a reasonable assumption, > >> and will it hold true for any (Ansi) C compiler? > > > > Yes, this your assumptions are correct, and this behaviour is required by > > the ANSI standard. > > Microntroller C's tend to drift away from "full ansi compliance." Does > anyone know for sure if any of the popular PIC C's WON'T handle the > short-cutting of the boolean expression correctly? I've looked at the output of CCS PCM under similar circumstances, and it does quit testing as soon as it can. Dale --- The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny ..." -- Isaac Asimov -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads