[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
     NAME:  Assign

     USE:  Associates a filename with a file variable.  The Filename can
           be any valid filename with or without a path, and is limited
           to 79 characters.  If no path is provided, the current directory
           is assumed.

           Once Assign is called, the file Variable will continue to be
           associated with the FileName until the File Variable is Re-
           assigned to another filename.

           If Assign is given a filename of 0 characters ( '' ) then
           the FileVariable will be associated with the standard input
           or output device.

     DEPENDENCY:  None

     SYNTAX: Assign(FileVariable, Filename);

     RESTRICTION:  Assign cannot be performed on an open file.

     EXAMPLE:      Program TestAssign;
                   Var
                      FVar : Text;

                   Begin
                      Assign(FVar,'Test.Dat');
                      ReWrite(FVar);
                      Writeln(FVar,'Assign Test');
                      Close(FVar);
                   end;

See Also: Append AssignCrt Close Eoln EOF Erase Reset ReWrite
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson