Compiler error missing ??

Wrote a looping routine with a conditional based on millis time duration.

The conditional was ((millis - previousMillis) < 5000) and the loop would just blow right through without taking 5 seconds.

I finally figured out the parenthesis were missing from “millis” and that fixed to loop.

The strange thing is, “millis” was ‘orange’ indicating the IDE recognized it as a program instruction keyword, but the compiler did not call it out as a syntax error because the parenthesis were missing.

Posting this find in case the IDE developers want to address this, or maybe there is some other purpose to use “millis” without the parenthesis that I am not aware of ??

but the compiler did not call it out as a syntax error because the parenthesis were missing.

Not putting the parentheses after a function name is not a syntax error. There are plenty of times where the address of the function is needed, where the parentheses must be omitted.

It is up to you to know whether you are calling the function, and must supply parentheses, or getting its address for some purpose, and must omit the parentheses.

If you don't connect the mind probes correctly, the compiler can't tell whether you meant to supply the parentheses, or not.

k5dcm:
The strange thing is, "millis" was 'orange'

Don't read much into the colour. The text colouring system is not very bright.

When the code gets to the compiler there are no colours.

...R