Andres K. Foerster wrote:
BTW: I don't think there is any need to call CrtInit directly.
If I leave it away, I even have problems under GNU/Linux with the second program...
Well - that is a problem. As far as I know, you should not need to call CrtInit directly.
Depends on what kind of "problems" (you didn't really explain that). Without CRTInit, CRT behaves more BP compatible (some might actually consider this a problem ;-), perhaps that's what you're seeing. But I think it's all explained in the comments in crt.pas.
Under GNU/Linux the second program without CRTInit outputs strange characters, even with some normal ascii-letter keys like l, k, j. There are even strange characters in the nummerical output. That's surely not just BP compatible. ;-) Using CRTInit helps.
Then something is really strange ...
CRTInit basically does two things, the equivalents (almost) of:
SetCRTUpdate (UpdateRegularly); SetPCCharSet (True);
Can you check if adding either or both of them instead of CRTInit makes a difference?
Frank