Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Turbo Pascal
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Units=== Over the years, Borland enhanced not only the IDE, but also extended the programming language. A development system based on [[BS 6192|ISO standard Pascal]] requires implementation-specific extensions for the development of real-world applications on the platforms they target. Standard Pascal is designed to be platform-independent, so prescribes no [[low-level]] access to hardware- or operating system-dependent facilities. Standard Pascal also does not prescribe how a large program should be split into separate compiling units. From version 4, Turbo Pascal adopted the concept of ''[[Unit (Software Development)|units]]'' from [[UCSD Pascal]]. Units were used as external function libraries, like the object files used in other languages such as FORTRAN or C. For example, the line <code>uses crt;</code> in a program included the unit called crt; the <code>uses</code> is the mechanism for using other compiling units. <code>interface</code> and <code>implementation</code> were the keywords used to specify, within the unit, what was (and what was not) visible outside the unit. This is similar to the <code>public</code> and <code>private</code> keywords in other languages such as [[C++]] and [[Java (programming language)|Java]]. Units in Borland's Pascal were similar to [[Modula-2]]'s separate compiling system. In 1987, when Turbo Pascal 4 was released, Modula-2 was making inroads as an educational language which could replace Pascal. Borland, in fact, had a Turbo Modula-2 compiler, but only released it on CP/M (its user interface was almost identical to that of Turbo Pascal 1β3) with little marketing. A much improved DOS version was developed, but as Borland was unwilling to publish the results, the authors including Niels Jensen bought the rights and formed [[Clarion (programming language)|Jensen & Partners International]] to publish it as JPI TopSpeed Modula-2. Instead Borland chose to implement separate compiling in their established Pascal product. Separate compiling was not part of the standard Pascal language, but was already available in [[UCSD Pascal]], which was very popular on 8-bit machines. Turbo Pascal syntax for units appears to have been borrowed from UCSD Pascal.<ref>{{cite web |url=http://miller.emu.id.au/pmiller/ucsd-psystem-um/reconstruct/03-03-02-linkage.html |title=3.3.2. Linkage to Externally Compiled and Assembled Routines β UCSD Pascal System II.0 User Manual Reconstruction β Version I.5, September 1978 |archive-url=https://web.archive.org/web/20070903053837/http://miller.emu.id.au/pmiller/ucsd-psystem-um/reconstruct/03-03-02-linkage.html |archive-date=2007-09-03}}</ref> Earlier versions of Turbo Pascal, designed for computers with limited resources, supported a "chain and execute" system of dynamic linking for separately compiled objects, similar to the system widely used in BASIC. Also, the language had a statement to include separate source code in a program when necessary, and overlaying was supported from TP3, but, as with overlays, chained objects had to fit into the original (limited) program memory space. As computing and storage facilities advanced, the ability to generate large EXE files was added to Turbo Pascal, with the ability to statically link and collectively load separately compiled objects. The .TPU files output by compiling a Turbo Pascal unit are tightly linked to the internal structures of the compiler, rather than standard .OBJ linkable files. This improved compiling and linking times, but meant that .TPU files could not be linked with the output of other languages or even used with different releases of Turbo Pascal unless recompiled from source.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)