Re: undefined variable problem



On 2007-03-30, John Appleyard <spamtrap@xxxxxxxxxxxxxx> wrote:

Check out Catherine's reply again. I think you may have misunderstood
what the compiler means by "undefined". It doesn't mean "not allocated"
or "not declared" or "not associated". It means "used before set" -
i.e. no value has been assigned to a since it was created (by allocation
or whatever). It is an error to use the value of a variable if it has
never been given a value, and that is what the compiler is complaining
about.

Yep. I indeed misunderstood what the compiler was telling me.
It has been a while since i've compiled my code with NAGWare's
f95 and the -C=undefined option. Now that I'm compiling with
this setup, it seems that there are quite some places where I use
undefined variables... djeez, do i love this compiler switch! :-)

Thanks,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: Delphi Product Manager questioned
    ... Michael C. wrote: ... I think you've misunderstood my postings. ... I have never, ever, ever opposed a 64-bit compiler ...
    (borland.public.delphi.non-technical)
  • Re: Compiles with gcc, not CC
    ... >I've just almost completed a programming assignment. ... You've misunderstood what these programs are. ... end that runs a C compiler. ... symlink to gcc. ...
    (comp.os.linux.development.apps)
  • Re: Sweeney presentation "The Next Mainstream Language"
    ... Specify int to be more specific than real. ... possibly helped by programmer annotations or checks. ... test just before the access to make the compiler see that the index is ... he included compiler-checked manual region allocation in Cyclone. ...
    (comp.lang.functional)
  • Re: Mex Overflow Error Using Free Borland Compiler
    ... > I need help eliminating the source of the following Mex runtime error. ... > Borland compiler handles overflow errors. ... > The first thing I tried is dynamic memory allocation. ...
    (comp.soft-sys.matlab)
  • Re: Benchmark: STLs list vs. hand-coded one
    ... bound - in fact it is hard to find anything in a compiler that isn't ... allocation bound (perhaps the scanner as it spends a rather large ... seems to have a gig of RAM. ...
    (comp.arch.embedded)