Solved

Files

Posted on 2003-10-29
2
146 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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