[fpc-devel] Coding Questions

VisionForce webmaster at visionforceweb.com
Fri Dec 2 04:26:49 CET 2005

I have some coding questions:


1. Is there a synchronous readkey function, instead of that asynchronous one? I'm trying to make a simple game to help me learn Pascal, but I got stuck on this. I know that Turbo Pascal 7 has the synchronous readkey, but isn't there a way to do this in normal Pascal?


2. How would I delay the movement of something? When I use Delay(250), it delays the whole program. In VB, I would write this:


Dim DelayAmount, DelayCount As Integer

DelayCount = 250


If (Environment.TickCount - DelayAmount) >= DelayCount Then

   ' run code here

   DelayAmount = Environment.Tick

End If



So what do I do? Oh, and I need this to be strictly Pascal if possible, not Delphi; and I'm using the Crt code, so it's a shell (command prompt style), not Windows forms.




Alex C. Barberi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20051201/e4f2cc54/attachment.html>

More information about the fpc-devel mailing list