Esteemed Forum Participants and Lurkers: . . . NEWBIE ALERT!
I have a timer variable "TimeL" that is incremented once per second and is type "long" because it has to count for at least a full day, which is 86,400 seconds.
I have several points in my program that compare integer constants or variables to the timer, such as the following:
long TimeL;
const int hourly = 3600;
...
if (TimeL < hourly) { ... less than 1 hour code goes here ... ; }
So, is the comparison math handled correctly if I compare type int to type long, or type long to type int? Or do I have to cast the type int to type long before doing the comparison to a type long? This question isn't covered at all in the Arduino Reference pages.
Thank you most sincerely for any and all comments, suggestions, and assistance.
Blessings in abundance, all the best, & ENJOY!
Art in Carlisle, PA USA