[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                            AssignCRT procedure

  DECLARATION:  AssignCrt(var F : Text);

      PURPOSE:  Associates a text file variable with the CRT.

         UNIT:  CRT

      REMARKS:  This works exactly like the Assign procedure, except that
                no file name is declared; instead, the file is associated
                with the CRT.  This will enable faster I/O.

      EXAMPLE:  Var
                   F : Text;
                   Answer : Char;

                Begin
                   Write('Output Test to (S)creen (P)rinter or (D)isk? ');
                   Answer := UpCase(ReadKey);
                   Case (Answer) of
                      'S' : AssignCrt(F);
                      'P' : Assign(F,'PRN');
                      'D' : Assign(F,'TEST.TXT');
                   End;  (* end case *)
                   ReWrite(F);
                   WriteLn(F,'This is a test of AssignCrt');
                   Close(F);
                End.

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