Previous: Library file -- TURBO.TPL
Up: Support unit Organisation
Previous Page: Library file -- TURBO.TPL
Next Page: Adaptations to pre-existing p-System units

Unit files -- .TPU files

When Turbo Pascal compiles a unit, it writes it to a .TPU file (for Turbo Pascal Unit). If the compiler can't find a requested unit in TURBO.TPL it then searches a given list of directories to find a .TPU file with the same root name as the unit. Note that it uses the full name of the unit, not just the first 8 characters.

Note an important reversal of order: in the p-System, the system library is checked last when looking for a named unit, which permits versions of units in their own files to be preferred when necessary. In Turbo Pascal, the library file is checked first, and the search stops if satisfied there. It is therefore not a satisfactory place to keep the binaries of units that are under development.

Educational Technology Center
Dept. of Info. and Comp.Sci.
Univ. of California, Irvine
92717, CA, USA