why can't i put non-static chapter exam apportionment while loop?


you can, obviously, put non-static chapter loop:



for (int i = 0; ...


and i've beheld same thing switch statements well:



if ((int i = f()) != 0) ...

switch (int ch = stream.get()) ...


but i try same thing while loop:



while ((int ch = stream.get()) != -1) ...


the compiler (vc++ 9.0) does during all.



is agreeable behavior? there reason it?



edit: i found i this:



while (int ch = stream.get() != -1) ...


but since superiority rules, that's interpreted as:



while (int ch = (stream.get() != -1)) ...


which i want.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?