Pages: [1]   Go Down
Author Topic: Significance of color of text in a sketch  (Read 241 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been unable to find documentation of the color of text in a sketch. Brown looks like reserved words, blue is text, etc. Here are my questions about the two code fragments. Why are LiquidCrystal.h and Wire.h brown and the other two includes black? Why is minute brown, while hour and second are black. This last one seems to be giving me a problem.

My RTC is on battery but minute gives a new value when the Arduino board is powered up.


#include <LiquidCrystal.h>
#include <DS1307RTC.h>  // a basic DS1307 library that returns time as a time_t
#include <Time.h> 
#include <Wire.h

lcd.setCursor(0, 1);
lcd.print(hour());
lcd.print(" ");
lcd.print(minute());
lcd.print(" ");
lcd.print(second());
lcd.print("  ");

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no real significance to the color. What color to assign to certain words is defined in files delivered with libraries, called keywords.txt.

The problem is that every keywords.txt file on your system is read, whether you are using the library that the file comes with, or not.

The presence of a keywords.txt file with a library is not mandatory, so the usefullness of the color coding is just about zip, none, nada, zilch.
Logged

Pages: [1]   Go Up
Jump to: