[fpc-pascal]Read STIN on FreeBSD

Marco van de Voort marcov at stack.nl
Thu Mar 8 19:58:32 CET 2001


> Perhaps I misunderstand the question,
> 
> but couldn't you use Readln, read, or keypressed/readkey? (if you use the
> CRT unit).  Under most systems (and Pascals), stdin is assigned to be the
> default for readln (and likewise stdout for writeln).  So, to read in a
> string from the standard input, you could use:
> 
> var
>  st:string;
> begin
>  readln(st);
> end;
> 
> 
> If you were looking for a charicter by charicter basis, you could use
> readkey.  If you need more examples, let me know.


It is possible to use readkey under FreeBSD, but from the ncrt unit, not the
CRT unit. The Linux Crt unit is very Linux specific, and was not portable to
FreeBSD.





More information about the fpc-pascal mailing list