View Single Post
  #1   Spotlight this post!  
Unread 31-01-2002, 22:30
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Subtotaling in PBASIC?

This is a pretty obvious question:

Is it possible to subtotal in PBASIC? Like, every time a cycle completes, a variable, lets call it Counter, goes up one?

I know in C++ to do that it's simple, just one line of code:

Counter = Counter + 1;
or
Counter++;

If I can, how can I do that in PBASIC? My other programming sidekick thought it would just be:

Counter = Counter + 1

Then, once a cycle, Counter would increase one integer, and eventually a "If Statement" would reset it to zero. I'm not sure if that syntax is right, and I figured might as well ask, and save some time and lots of possible fustration, as was caused with the switch operated PWMs, as some of you know . So, if I'm right, thanks, if I'm completely wrong, well, don't feel bad to be brutaly honest, even though that really isn't the spirit here, which is good.

Thanks,
Ian W.