B
BartC
std::cout << x << std::endl;
You'd think that would all it's capabilities, C++ would allow you to devise
a way of writing just:
print x
std::cout << x << std::endl;
You'd think that would all it's capabilities, C++ would allow you to
devise a way of writing just:
print x
In comp.lang.fortran Keith Thompson <[email protected]> wrote:
If you mean a reference to a whole arrayIf you program Java for a while, you get used to it. Java compilers
are supposed to treat it as an error, not a warning, if the
compiler can't determine that a scalar variable is initialized.
(No such test for arrays.)
But, yes, I always think it is dumb when I know it is initialized,
but the compiler doesn't. With the Java exception model, though,
it isn't always so obvious. If a called method throws an exception,
it might be that the variable isn't assigned a value, even if it
Presumably in C, since Java doesn't have unsigned except char.is in an assignment statement. Or consider:
That one has a good chance of fooling the human reader but won'tunsigned i,x;
for(i=-1;i<3;i++) x=3
If you try hard enough, you can always find a way to fool the
compiler initialization test logic.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.