Article View: comp.lang.pascal.borland
Article #684Re: Writing to text Files
From: Robert Craven
Date: Sun, 06 Jun 1999 00:00
Date: Sun, 06 Jun 1999 00:00
36 lines
1133 bytes
1133 bytes
To view a textfile:
var
f:text;
s:string;
begin
assign(f,'fdsat.txt');
reset(f);{ReadOnly}
while(not(eof))do
begin
readln(f,s);
writeln(s);
end;
close(f);
end.
To write to a textfile:
var
f:text;
s:string;
begin
assign(f,'fdsat.txt');
rewrite(f);{To write to a file}
readln(s);
writeln(f,s);
close(f);
end.
{To open a file use, reset or rewrite or append. Append opens an existing
file, set the position its end and you can write to this file!}
cu
Robert
Technical Details
Message-ID:
<375a7429@news.zeitung-online.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7jaola$r31$1@news5.svr.pol.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111659,863a3507bf12c2da X-Google-Attributes: gid111659,public X-Google-Thread: 110467,863a3507bf12c2da X-Google-Attributes: gid110467,public From: "Robert Craven" <Rob.Craven@gmx.de> Subject: Re: Writing to text Files Date: 1999/06/06 Message-ID: <375a7429@news.zeitung-online.net> X-Deja-AN: 486298140 References: <7jaola$r31$1@news5.svr.pol.co.uk> X-Trace: 6 Jun 1999 15:14:17 +0100, 195.60.75.164 Newsgroups: comp.lang.pascal.borland,fido.ger.pascal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3