Virtual Pascal

Classic Object Pascal for free

I am currently creating a program in which I need to display the date and time. I have these displaying however I need your help as to how to create a digital clock which self updates for each second gone by. (I hope that makes sense!)

Here is my coding for this:

PROCEDURE Time;

VAR
Hour,Minute,Second,Sec100 : Word;

BEGIN
TEXTCOLOR(LightRed);
GETTIME( Hour, Minute, Second, Sec100 );
WRITE( Hour,':',Minute,':',Second );
END;


I think I need a Repeat and a clear screen around the coding but not exactly sure on a delay.

All help is greatly appreciated!

Share

Reply to This

About

Allan Mertner Allan Mertner created this social network on Ning.

Create your own social network!

Badge

Loading…

© 2009   Created by Allan Mertner on Ning.   Create Your Own Social Network

Badges  |  Report an Issue  |  Privacy  |  Terms of Service