Board index » delphi » STUPID QUESTION ??

STUPID QUESTION ??

Recently i had a very simple problem

I would like to change some lines in a TEXT file.

Not adding with append but inserting new ones and existing lines
editing and saving again.
Strangely enough the Reset(F) command does only allow reading a file
and not writeln'ing.

HOW can this be done ??  beats me...

Thanks, Paul

 

Re:STUPID QUESTION ??


Quote
On Fri, 17 Nov 1995, Paul Rensel wrote:
> Recently i had a very simple problem

> I would like to change some lines in a TEXT file.

> Not adding with append but inserting new ones and existing lines
> editing and saving again.
> Strangely enough the Reset(F) command does only allow reading a file
> and not writeln'ing.

> HOW can this be done ??  beats me...

> Thanks, Paul

The rpoblem is, that there IS no way to do this! :-(
You could: a) read the file, edit it and write it again...
           b) open the File as 'normal' (FILE not TEXT) and define an own
              procedure to do your job (better in ASM)
Normaly a) should be the easier way.... :-/

------------------------------------------------------------------
        __    _     _
      _(  |__\ \   / /    Alexander Schweimler
     /  ) | __\ \ / /     Gerbertstr. 1
    / * | ||__ \ \ / *    D-79117 Freiburg
   /  * | | __| > / ***   Tel.   : +49-761-66542
  /   _ | ||__ / ^ \ *    e-mail : schwe...@ruf.uni-freiburg.de
 /___/ || |___/ / \ \
-------|  |__/_/---\_\---*--------+++++++-------------------------
    ** (______\ ***

Other Threads