Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A question about the clock.

Status
Not open for further replies.

Rosciano

Technical User
Jun 16, 2003
64
IT
Hello,
I am translating a book for my class "How programming started ..." from English to Spanish. However, I did not answer a question from a student.

A week ago, during a dBase brush up; while we were examining ASSIST, he asked me: "how does the clock works continuously" referring to a clock put at the beginning of the page which, with the program not working, showed the actual time running the hour, minutes and seconds.
I was afraid of this question; I had already examined the code, but without results and the book I had was very frugally with the matter.
I couldn't answer the question. [sad]

Is there someone who can help me with the dBase code for this watch?

Thanks very much.



 
Rosciano,
I have run the above program which changed my Foxpro screen to dark blue [bigsmile] - but the clock stopped working when the option question appeared.
So it would be good for Dbase III plus to keep the clock running while answering the option question was answered. CD = inkey() seems to get in the way.
However it is a very good step forward for 3 plus. [bigsmile]
 
...but the clock stopped working when the option question appeared...


If the option appears, it means that, for some reason, has left the DO WHILE. I don't know, I would have to watch the program or know more about Foxpro.

You gave me the clue when you said "...be activated once when you run your program..." so this is the reason for the DO WHILE, keep the loop as long as a key is not pressed.

But the mystery of how they do it at ASSIST continues ...


Sorry for the delay answering

 
Hi Rosciano,
Sorry about my delay in responding. The ASSIST may be written in a different language for some reason.
However, I will look into this interesting mystery as soon as possible...

 
Good luck! [thumbsup2]
Get in touch if you find something interesting.

 
Hi,
Not found anything too exciting, but I've done a simpler version of continuous time on screen:-

Do While .T.
@20,30 say time()
@20,40 say 'PRESS ESCAPE TO CLEAR'
if inkey()=27
clear
exit
endif
Enddo

In the meantime I'll keep looking [bigsmile]
 
Keep in mind that in ASSIST it works WITHOUT any key pressed... The watch works from the beginnig [ponder]
Definitely, it must be written in other language.
 
Hi,
In the early days in dBase and FoxPro some displays like the clock were hard coded where the user was not able to make modifications.
I have seen some of the requests for certain commands/functions to be introduced in the next program update. I remember them bring discussed in various magazines of the time. Still looking[3eyes]
 
The original version was written entirely in language assembly, while the successive version, from dBase III, was written entirely in language C.
Google

Perhaps ASSIST was written in the same language?

 
Hi,
Yes, Foxpro was helped by the C+ language. Probably these are the answers. I have a book of user defined functions from the late 1980s which helped dBase and FoxPro users and was called 101+ FoxPro & dBase user-defined functions by Philip Steele. If you are looking for anything in particular (apart from time stuff) let me know.[bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top