🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #681

Re: Writing to text Files

#681
From: raygarza
Date: Sat, 05 Jun 1999 00:00
27 lines
1417 bytes
In article <7jaola$r31$1@news5.svr.pol.co.uk>,
  "Ali" <Bathman@gothom.freeserve.co.uk> wrote:
> Could some one show me a quick little,simple source code to writing
to text
> files, i've tries to write to a text file but i get an error: File
not open
> for output (run time error, i think error no: 105). THis is how i try
to
> write to text files:
> var
>     f:text;
>     c:char;
> begin
>     read(c);
>     assign(f,'fdsat.txt');
>     reset(f);
>     Write(f,c);
> End.
>
>
change the reset(f); to Rewrite(f);
the reset command is o prepare the file to be read not written to
-ray-


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID: <7jb8sq$7tn$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7jaola$r31$1@news5.svr.pol.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110467,863a3507bf12c2da
X-Google-Attributes: gid110467,public
X-Google-Thread: 111659,863a3507bf12c2da
X-Google-Attributes: gid111659,public
From: raygarza@my-deja.com
Subject: Re: Writing to text Files
Date: 1999/06/05
Message-ID: <7jb8sq$7tn$1@nnrp1.deja.com>
X-Deja-AN: 486003262
References: <7jaola$r31$1@news5.svr.pol.co.uk>
X-Http-Proxy: 1.1 x28.deja.com:80 (Squid/1.1.22) for client 4.16.150.113
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Sat Jun 05 13:32:10 1999 GMT
Newsgroups: comp.lang.pascal.borland,fido.ger.pascal
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)