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.

Using Several Library Files With One ProgramIf you have a number of library files on the same disk as the executingprogram where, for example, the program SEARCH.CODE has the filenameREPORT:SEARCH.CODE, your Library Name File (with the filenameREPORT:SEARCH.LIB) would containLIBRARY FILES:REPORT:LIB1 .LIBREPORT: LIB2. LIBREPORT:LIB3.CODE$$LIB I.LIB, LIB2.LIB, and LIBS.CODE are sample names for library files. (Youmay use any name for a file containing Program Units, as we did forLIBS.CODE, although using the suffix .LIB makes it easier to remember thatit is a library of units.)Using the Pascal Prefix in a Library Name FileYou could simplify the writing of a Library Name File by setting the Pascalprefix to the name of the disk you are currently using. For example, if youset the Pascal prefix to the volume name, REPORT: (or, say, #9:) beforeexecuting SEARCH.CODE, you could write the Library Name File moresimply, like this:LIBRARY FILES:LIB1 .LIBLIB2.LIBLIB3.CODE$$The system will attach the prefix to a library filename before opening thatfile. Setting the prefix is described in Part II of this <strong>manual</strong>, Chapter S.If you use the Pascal prefix in conjunction with the set of filenames listed inthe Library Name File, you must make sure that the prefix is set to producethe correct filenames so that the program can find its library files when it isexecuting. If you successively execute programs on different disks, orprograms with library files on different disks, you will need to change thePascal prefix before executing each program to ensure that the filenamesfor the shared library are correct at execution time. You may find itconvenient to rely on setting the prefix during program development, butyou would probably not ask a user to set the prefix before running anapplication program. A more foolproof way would be to use the percentprefix before each filename, as explained later.III-234Chapter 13: Libraries

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

Saved successfully!

Ooh no, something went wrong!