[fpc-pascal]Read STIN on FreeBSD

Jonas jonas at zeus.rug.ac.be
Thu Mar 8 18:21:01 CET 2001


On Thursday, March 8, 2001, at 06:06 PM, Neilson Henriques wrote:

>     I'm a newbie using FPC so I asking for how can I read stdin.  
>     My FPC is 1.0.4 running under FreeBSD.  

var
  stdin: text;
  s: string;

begin
  assign(stdin,'');
  reset(stdin);
  readln(stdin,s);
end.

You can normally even simply use

var
  s: string;

begin
  readln(s);
end.

The default input is stdin.


Jnas




More information about the fpc-pascal mailing list