Board index » delphi » Arrays & Textfiles

Arrays & Textfiles

Does anyone have a fragment of TP7.0 code that will write out the contents
of
two arrays (one text , one numeric) to a text file. As you might have
guessed
I am a newcomer to Pascal - and this particular problem is driving me nuts.
I know its relatively straightforward but I'm getting very frustrated with
constant
error messages from TP7 at runtime.

Any help appreciated & gratefully received.
TIA
a...@{*word*269}.net

 

Re:Arrays & Textfiles


In article <01bd7534$9d19b9e0$2a4aa8c2@default>, HeatSeeker
<a...@{*word*269}.net> writes

Quote

>Does anyone have a fragment of TP7.0 code that will write out the contents
>of
>two arrays (one text , one numeric) to a text file.

{pseudocode}

define yourfilename as text;

assign textfile to yourfilename
rewrite the textfile
for i := 1 to numberofrecords do
 writeln(textfile,arraynamefortext[i]);
for i := 1 tp numberofrecords do
 writeln(textfilearraynamefornumeric[i]);
close textfile

{/pseudocode}
--
Pedt Scragg                    <newsmas...@pedt.demon.co.uk>

Never curse the Crocodile's mother before crossing the river

Re:Arrays & Textfiles


In article <01bd7534$9d19b9e0$2a4aa8c2@default>,

Quote
HeatSeeker <a...@{*word*269}.net> wrote:

:Does anyone have a fragment of TP7.0 code that will write out the contents
:of
:two arrays (one text , one numeric) to a text file. As you might have
:guessed

I already tried to answer this question. Might you have missed it or
did my answer not sufficiently cover your dilemma? Please use
http://www.dejanews.com/ to browse through the old postings.

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

Other Threads