View Single Post
  #8   Spotlight this post!  
Unread 14-03-2003, 21:56
Alex1072 Alex1072 is offline
Registered User
AKA: Alex
#1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: San Jose
Posts: 110
Alex1072 is an unknown quantity at this point
Send a message via AIM to Alex1072 Send a message via Yahoo to Alex1072
Re: Autonomous Code From Experience

Quote:
Originally posted by EbonySeraphim


If you want to use such a counter you have to consider two things - if you want to go over 254 you need to use your own logic and do something like:

counter = counter + 1
if counter = 254
counter1 = 0
counter2 = counter2 + 1
endif

I don't want to explain too much but this would basically allow you go count up to 2^16...
PBasic supports word size variables which would let you hold 2^16 without adding extra code. Our code worked something like this:


Time VAR word

...

Time = Time + 1


Hope this helps.