Recent

Author Topic: Why I always see that???  (Read 6882 times)

CCJ

  • Newbie
  • Posts: 6
Why I always see that???
« on: November 13, 2005, 01:48:12 pm »
When I run the program, whatever program is and whatever variable it includes, I always see the sentence below in the Messages:

Hint: Variable "f" does not seem to be initialized

I've done all I know in TP7 language, but it is still there.  Can anybody tell me why it got like this?

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: Why I always see that???
« Reply #1 on: November 13, 2005, 03:18:15 pm »
Local variables are not initialized. So if you use a local variable in your procedure without it being assigned a value, this is the hint you get. Compilers are not clever enough to understand that if you use an if ... then ... else and in both branches your variable gets assigned that your variable is initialized.
So just check your code to make sure that you give your variable a value before using it and if so ignore the hint. :)
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

CCJ

  • Newbie
  • Posts: 6
RE: Why I always see that???
« Reply #2 on: November 14, 2005, 02:59:32 pm »
Thanks!

 

TinyPortal © 2005-2018