Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/04/02 10:42
Read: times


 
#33738 - RE: Problem with reading timers
I don't follow your explanation. main can't be in a loop ... do you mean there is a while(1) in main? How and when is Knipper called?

Do you have a simulator? Try following execution through with that to see what your code is doing.

As you have written it, teller will be 0 (or whatever value the compiler chooses, you didn't initialise it) every time Knipper is called. That's part of your problem - teller is an uninitialised auto variable.

You need:

static teller = 0;

now teller will maintain it's value between calls to Knipper()

List of 27 messages in thread
TopicAuthorDate
Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
crash course            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      
RE: Problem with reading timers            01/01/70 00:00      

Back to Subject List