PDA

View Full Version : Symbol not previously defined



Archangel
- 27th December 2008, 06:55
I knew defines have to be in uppercase in order to work, but I found this interesting when I copy / pasted from the CD of the book Expermenting with the PICBASIC PRO COMPILER by Les Johnson.
The Port defines were not in uppercase. The code compiled using PM but with MPASM, it gave the errors as" Symbol not previously defined (PORTB).
<br>
Anyway I wanted to pass that along as a cause for that error.

Darrel Taylor
- 27th December 2008, 07:04
I realize there's been a lot of chatter recently that "DEFINES MUST BE CAPITALIZED".

But as you've seen, that is only true for MPASM.

Simply put, MPASM is case sensitive. PM is not.

Archangel
- 27th December 2008, 09:52
I never knew they generated an error message, I thought they simply failed to work, when I got this error, it took a few minutes to nail down the cause. But the MPASM vs PM case sensitivity issue makes sense. It also clears up the confusion as to why some people seem to get by without using uppercase.