View Single Post
  #11   Spotlight this post!  
Unread 11-03-2004, 15:12
Xufer's Avatar
Xufer Xufer is offline
8 Seasons and as stable as ever
AKA: Working, 2/4 degrees complete still schooling...
FRC #1740 (The Cyber Colonels)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Waterford, CT
Posts: 231
Xufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to behold
Send a message via AIM to Xufer Send a message via MSN to Xufer Send a message via Yahoo to Xufer
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