Problem With My State Variable

boolean state = false;

the state word is not in orange colour.

could somebody tell me why?

Why do you think it should be?


need to declare first?

That is a declaration.

Got Alexa?

why are some words colored in the arduino ide?

or google it.



boolean is blue not orange... state is black.

RV mineirin

@mdfahmiii Take no notice of the colours as they are largely meaningless

When a library is created a file can be used to describe the library keywords and their colour and there is a similar mechanism for system keywords.
This is meant to give a clue as to whether the keyword exists or not.

However, the IDE is not clever enough to work out which libraries have been #included and hence which keywords are relevant and it uses the colours for keywords in any installed library, thus making the mechanism a waste of time

We have colouring by numbers, but there isn’t such a thing as coding by colours.

You really need to practice and learn syntax, then (if it’s available) the colours just help visualise the simplest structures.

Same with colouring, if you don’t read the guide, a number six dinosaur might be purple in the ‘Barney’ kit, or dark grey-green in the ‘Attenborough’ kit.
They’re both right for different reasons.

The colouring is just to help make some peopl happier.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.