Solved

Files

Posted on 2003-10-29
2
141 Views
Last Modified: 2010-04-05
how can you open a file for reading?
0
Comment
Question by:sandy22
  • 2
2 Comments
 

Accepted Solution

by:
SandyXP earned 130 total points
ID: 9643606
Use the assignfile(f, 'myfile.txt'); (var f: textfile)
to open for reading: reset(f), or for clearing and then writing: rewrite(f)

to read from the file, use read(f, var1[, var2, ....]);
to write, use write(f, 'text');

finally, close the file with closefile(f)
0
 

Expert Comment

by:SandyXP
ID: 9643701
o! and you could include {$i-} IO Operation {$i+} to except the errors that may appear in an IO Operation- ex. working with files
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now