I've tried readln and read, but it doesn't seem to
work. A little sample program will be apreciated!!!
TIA
Bengt
Here's a little sample from Turbo-Pascal, but I'm sure it will
work in console mode Delphi apps.
var stinfile:Text;
begin
assign(stinfile,''); {assign standard in with a filehandler}
reset(stinfile);
read(stinfile,c); {reads one char from stdin}
close(stinfile);
end.
--
Tommy Ovesen
Norwegian Institute of Fisheries and Aquaculture.
>Anybody know how to read the standard input in
>Delphi 2.0? ({$APPTYPE CONCOLE} is in place...)
>
>I've tried readln and read, but it doesn't seem to
>work. A little sample program will be apreciated!!!
>
>TIA
>Bengt
Yep. It's actually pretty easy to do but you need to use the API. I
wrote a CGI interface to get STDIN get CGI values for variables and
URL Decode them, Get enviroment variables and write to STDOUT.
Actually it was the first Delphi 2.0 program I ever wrote (converted
my VB 4.0 version of it). Email me and I'll get you started, at this
point I wish to clean up my code a little before I post it on the web.
Paul Stohr
pst...@prplus.com
use:
function ReadAChar:char;
var a:char
begin
read(input,a);
result:=a;
end;
HTH,
Paul, (Thurs, 2 May 96, 10:59 EST)
SoftStuff, Croydon, Victoria, Australia, 3136
pa...@linuxserver.pccity.com.au