AssignFile

www.kxcad.net Home > Electronic Index > Altium(Protel) Index


Your Ad Here

Declaration

procedure AssignFile(var f: file; const filename : string);

Description

Call AssignFile to assign a filename to a file prior to opening a file.

Example

AssignFile(OutputFile,NewFileName);

Rewrite(OutputFile);

AssignFile(InputFile,OldFileName);

Reset(InputFile);

Try

    While Not EOF(InputFile) do

    Begin

        Readln(InputFile,Line);

        For I := 1 to Length(Line) Do

            Line[I] := UpperCase(Line[I]);

        Writeln(Outputfile, Line);

    End;

Finally

    CloseFile(InputFile);

    CloseFile(OutputFile);

End;

Close;

See also

Append, CloseFile, ChDir, MkDir, Read, ReadLn, RmDir, Write and Writeln functions.

Your Ad Here