News:

Let's find out together what makes a PIC Tick!

Main Menu

Constant and label by same name

Started by rick.curl, Jan 09, 2025, 03:57 PM

Previous topic - Next topic

rick.curl

I have been tearing my hair out trying to find the source of a strange error. The compiler was complaining about the line "While Pass < Shutdown" and it was throwing the error "LWL is an unknown or Unsupported comparison", but there was no "LWL" anywhere in my code.  I finally realized the problem was that I had assigned "Shutdown" as a constant, and later in the code I used "Shutdown" as a label.  It's entirely my fault, but I would be embarrassed to tell you how many hours I spent trying to find it.

So my question is this- would it be possible for the IDE to check to see if the same name was used for a constant (or variable) and a label?

Thanks!

-Rick