|
Re: quick question: TIMERS
Quote:
|
Originally Posted by 10intheCrunch
Again...read my post...
If you use an int for your counter variable, you will have more than enough space. An int in C is a two byte variable, meaning the signed version can store from -32000 to 32000.
What you're thinking about is a char, a one byte variable. That will turn over at 254 (or 128 if it is signed).
Have you tested your code yet?
|
so what if i use my orrigianl code and just change char to int then i wont have to eorry about the overflow problem right ?
__________________
If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.
Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy Photonics, It's Your Future
|