13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

although it permits inputs as well. With typed files, REWRITE creates arecord-sized buffer variable for GET and PUT procedures. REWRITE is aprocedure with two parameters:REWRITEfileidentifierstringexpressionThe file identifier is the name of a declared file variable. The stringexpression is either the complete designation of a disk file or the volumename or number of an external device.Here are examples of two ways to use REWRITE to open the file variableFILEID-first as a disk file MYFILE on the disk MYDISK and then as acharacter device:REWRITE ;REWRITE ;The following rules govern the use of REWRITE:o If a disk file with the same complete designation already exists,REWRITE creates another. The CLOSE procedure will later delete one orthe other.o If the file variable corresponds to an already open disk file, an I/O erroroccurs. The file remains open.o Calling REWRITE with a character or block-structured device that is notaccessible to the system causes an I/O error.o REWRITE can be used to associate a different file variable with analready open external file.The RESET ProcedureRESET opens any character or block-structured device or any alreadyexisting disk file. It is normally used before input operations, although itpermits outputs as well. With typed files, RESET creates a record-sizedIII-164Chapter 10: Input/Output

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!