Solved

Files

Posted on 2003-10-29
2
147 Views
Last Modified: 2010-04-05
how can you open a file for reading?
0
Comment
Question by:sandy22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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