why isn't readkey working in Free Pascal

July 3, 2018 at 22:19:25
Specs: Windows 10
readkey works in some of my code when I want to write to the screen, pause to read the note, then proceed when any key is pressed. Then it won't work in other parts of the code. Why would this happen? all units "use crt". Readln not working at those times, either. For the old program written in Turbo 4 it all worked just fine.

Why would this happen?

See More: why isnt readkey working in Free Pascal

Report •

July 4, 2018 at 01:28:10
Does it not work when you try to exit the program, while doing anything else does work?

if so and you're trying to exit while in a loop, use exit or halt instead of break

i5-6600K[delid]@4.8GHz/4.4GHz@1.39v LLC=6 | 2x4GB Crucial-DDR4-2133CL15@14-14-14-30 1T 2800MHz@1.37v
MSI Armor RX 570 4GB@1395Mhz core@1.168v/1920MHz BiosModded

message edited by hidde663

Report •

July 5, 2018 at 19:26:43
I haven't used free pascal, so I don't know what its environment limits are. That said:
Have you tried it on "retro" platforms? win-8 (or less), or 32-bit? We all want our programs to run and work, except for Microsoft. Anything that reeks of "free" or "open source" coding is, IMO, anathema to MS. But that's just me! I may be speaking way out of school. If it fails on a 32-bit lesser windows, then it's a coding issue and not the platform. Also: maybe post some sample code that does and/or does not work. It seems simple enough what you want: pause for a keystroke. So maybe with your code sample someone here can isolate the flaw.

Report •
Related Solutions

Ask Question