Why does "blink" show as a command?

Status
Not open for further replies.

Fintek

Member
I tried using the word "blink" in the Arduino IDE (1.8, not 2.0) and it turns red as if it was a command. But it isn't.... was it at one time? What would be the syntax?
 

As far as I could see 'blink' is just used as an array in that example, and not a command.

Blink is the standard test program for Arduino's, and usually comes pre-loaded to prove it works - so it 'migt' be a reserved word because of that?.

However, there's a text file "lib/keywords.txt" which is used to colour reserved words etc. but 'blink' isn't listed there. Perhaps it may be used somewhere in one of the libraries?, or it's reserved elsewhere?.

From the link above, if you enter blink as an array it's also highlighted as a reserved word, but seems to compile fine. Whereas blank isn't highlighted. Presumably it must be listed 'somewhere', so I would advise not using it - as it might cause an issue if it clashing with something - however, as it compiles OK then it 'might not' be an issue, but why risk it?.

 
In the examples I and Nigel show above, no libraries are included so it's part of the standard code. No idea what.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…