home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turbo Toolbox
/
Turbo_Toolbox.iso
/
1990
/
02
/
tricks
/
textverl.inc
< prev
next >
Wrap
Text File
|
1989-11-14
|
1KB
|
38 lines
(* ------------------------------------------------------ *)
(* TEXTVERL.INC *)
(* ------------------------------------------------------ *)
(* vom Programm wird benötigt:
TYPE
FName = STRING(.14.);
VAR
TF : TEXT;
Name : FName; *)
PROCEDURE Text_File_VerL(Name : FName);
VAR
TFA : TEXT;
NameAlt : FName;
Satz : STRING(.255.);
BEGIN
Assign(TF, Name);
{$I-}
Reset(TF);
{$I+} (* existiert FILE mit 'Name' ? *)
IF IOResult = 0 THEN BEGIN (* ja *)
Close(TF);
NameAlt := Copy(Name, 1, Pos('.', Name)) + 'ALT';
Rename(TF, NameAlt);
Assign(TF, Name); Rewrite(TF);
Assign(TFA, NameAlt); Reset(TFA);
WHILE NOT EOF(TFA) DO BEGIN
ReadLn(TFA, Satz);
WriteLn(TF, Satz);
END;
Close(TFA); Erase(TFA);
END ELSE Rewrite(TF);
END;
(* ------------------------------------------------------ *)
(* Ende von TEXTVERL.INC *)