Computing: DOS, OS/2 & Windows Programming

Free Pascal - Reading data from the keyboard in a Crt window.


I suppose that it's a bug in the OS/2 Crt unit (?): When trying to read data from the keyboard, you just got nothing, i.e. the variable specified as argument in the Readln statement will always be empty (resp. 0, in the case of a numeric value). I have implemented a work-around by writing my custom input routines (ReadString, ReadInteger, ReadReal). For details, please, have a look at my article Installation of FPC 3.2.2 on OS/2 Warp 3 in the Lazarus/Free Pascal Programming section. Use the following link to download the source code of my ReadCon unit. Note, that this unit is also included with all OS/2 Free Pascal program samples on my site.