What should be added to C

Frank Adams franka at mmintl.UUCP
Wed Jun 4 14:06:38 AEST 1986


In article <1617 at ecsvax.UUCP> bet at ecsvax.UUCP (Bennett E. Todd III) writes:
>In article <1497 at mmintl.UUCP> franka at mmintl.UUCP (Frank Adams) writes:
>>   if (!(A)) goto _Z;
>>   X
>>   if (B) {
>>     Y
>>   } else {
>>_Z:
>>     Z
>>   }
>
>Why not use
>
>    if (A) {
>        X
>        if (B) {
>            Y
>        }
>    } else {
>        Z
>    }

Because this doesn't execute Z when A is true but B is false.

Frank Adams                           ihnp4!philabs!pwa-b!mmintl!franka
Multimate International    52 Oakland Ave North    E. Hartford, CT 06108



More information about the Comp.lang.c mailing list