Go Down

Topic: #define BUTTON not recognized? (Read 850 times) previous topic - next topic

CiceroneRay

Day 2 of working with the board and just tryint to work through the examples here.

When I try to verify the press button example (exactly as it appears in teh book) the second #define statement (#define BUTTON 7) keeps giving an error message. The error says: "Unexpected unqualified-id before numeric constant."

I've tried all the fixes I can think of, checked the grammar for #define and even changed the variable name, all with no luck. The #define LED 13 statement immediately before this isn't causing a problem.

Can anyone see what the problem is here or steer me in the right direction?

Cheers,

Ray

CiceroneRay

Oh, never mind.

The syntax problem was on the NEXT line. No ; after the val statement.

Sheesh!

R

Grumpy_Mike

That is a very important lesson, remember it well.
The error often is in the line before or after the one the compiler chokes on.

Go Up