13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Pascal FilesA file is defined as a stream of bytes. Information sent to a printer, as wellas computer programs, letters, and lists stored on disks, are all examples offiles.Most files used by Apple Pascal are of either of two types: textfiles thatstore information such as computer programs' source text, letters, andreports; and cod.efiles containing P-code, the compiled version of aprogram. You edit only textfiles, not codefiles.Much of this <strong>manual</strong> is devoted to a discussion of disk files-files storedon disks. When you create a file with the Editor, it is stored in the Apple'smemory. Then, when you are ready to save your file, you use one of theEditor's commands to save a copy of the file onto a disk. To use the Editor tochange the content of a file already on a disk, you must first copy the fileinto memory; then you can change the contents of the file, and again savethe file onto a disk.Each time you create or modify a disk file, information about that file,including the file's name, length, type, and last modification date, is placedin the disk directory. Filer commands enable you to display andmanipulate the information contained in the disk directory.Creating and Editing FilesIn general, you will follow one of two procedures when creating and editingtextfiles.The first method, which uses the system's workfile, is most useful whenyou are using the Editor to write small computer programs and are stillfairly new to programming.The second method, which uses the Editor's Write and Save commands, isused both for program preparation and for editing nonprogram text such asletters, reports, and <strong>manual</strong>s. These two methods are illustrated inFigure 1-1.Pascal FilesII-3

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

Saved successfully!

Ooh no, something went wrong!