What should be added to C
Bennett E. Todd III
bet at ecsvax.UUCP
Tue May 27 23:49:59 AEST 1986
In article <1497 at mmintl.UUCP> franka at mmintl.UUCP (Frank Adams) writes:
>In article <5498 at alice.uUCp> ark at alice.UUCP writes:
>>Frank Adams says:
>>> o An andif clause for if statements.
>>
>>What does it do and how would you use it?
>
>You would write:
>
> if (A) {
> X
> } andif (B) {
> Y
> } else {
> Z
> }
>
>This is equivalent to:
>
> if (!(A)) goto _Z;
> X
> if (B) {
> Y
> } else {
>_Z:
> Z
> }
Why not use
if (A) {
X
if (B) {
Y
}
} else {
Z
}
-Bennett
--
Bennett Todd -- Duke Computation Center, Durham, NC 27706-7756; (919) 684-3695
UUCP: ...{decvax,seismo,philabs,ihnp4,akgua}!mcnc!ecsvax!duccpc!bet
More information about the Comp.lang.c
mailing list