Topic: declarations in conditions but not conditional exp ops
Author: emberson@fx.com (Richard M. Emberson)
Date: 1995/04/14 Raw View
bool
hodeedoe()
{
if (int i = 2) { //ok ansi/iso resolution A
return true;
} else {
return false;
}
return (int j = 2) ? true : false; // error
}
Why not??
Richard Emberson
--
Dow Jones Telerate Systems, Inc. mail: emberson@fx.com
2465 Faber Place uucp: uunet!fx!emberson
Palo Alto, California 94303 phone: 415/858-7777-242
Author: emberson@fx.com (Richard M. Emberson)
Date: Wed, 18 Jan 1995 17:14:20 GMT Raw View
bool
hodeedoe()
{
if (int i = 2) { //ok ansi/iso reslotutions A
return true;
} else {
return false;
}
return (int j = 2) ? true : false; // error
}
Why not??
Richard Emberson
--
Dow Jones Telerate Systems, Inc. mail: emberson@fx.com
2465 Faber Place uucp: uunet!fx!emberson
Palo Alto, California 94303 phone: 415/858-7777-242