home *** CD-ROM | disk | FTP | other *** search
- program ReadLine;
- {A test to simulate the ReadLn procedure}
-
- uses
- Crt;
-
- var
- IS : string[80];
-
- procedure ReadLn ( var InStr );
-
- var
- Ch : char;
- InS : string[80] absolute InStr;
-
- begin
- Ch := #32;
- InS := '';
- repeat
- if not keypressed
- then {Whatever you need to do to pass the time slice}
- else
- begin
- Ch := readkey;
- if ( Ch = #13 )
- then { do nothing }
- else { This is very simple and you may have to add some editing}
- begin
- write ( Ch );
- InS := InS + Ch;
- Ch := #32;
- end;
- end
- until ( Ch = #13 );
- writeln;
- end;
-
- begin
- IS := '123';
- readln ( IS );
- writeln ( IS );
- end.