Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Program Trouble

Name: Anonymous 2008-02-07 15:01

Im writing a simple program for a college project in Delphi.

Its a simulation of a petrol pump using 7 segment numbers. The way I have programmed it is using a timer for each number (9 timers for each seven segment) so every set of 9 timers is x10 more than the previous to make my display continuous. However this is not the case. The first seven segment set works fine and the second one does too, but the 3rd one (10 sec interval) after its first run through comes in late every time.

Anyone know why?

Name: Anonymous 2008-02-07 15:09

Delphi timers use Windows' WM_TIMER message, which is low priority and may be discarded if it's not processed in a short amount of time. By having loads of timers, you're inundating your program with these messages and it probably just can't handle them all in time. You'd be much better off having only one timer that increments a stored number, and then updates the seven segment displays based on that number.

Name: Anonymous 2008-02-07 15:13

>>1
college project in Delphi.
You need a better college.

Name: Anonymous 2008-02-07 15:27

>>3

DON'T HELP HIM !

Name: Anonymous 2008-02-07 17:34

wahhh im too lazy for verbose language constructs. mommy, boot up windows for me and type in my code, my fingers are sore from all the delphi programming i did yesterday

Name: Anonymous 2008-02-07 17:40

>>3
Language choice isn't all THAT important when you're learning programming. Regardless, Delphi is a pretty good beginners' language.

Name: Anonymous 2008-02-07 18:32

>>6
THEN THEN THEN THEN THEN THEN THEN

Don't change these.
Name: Email:
Entire Thread Thread List