Turbo Pascal version 1.0, Delphi, and "Standard" Pascal
So I did some further digging and here are some additional notes and links about the areas of similarities and differences between Turbo Pascal version 1.0 and "Standard" Pascal (there are several):
Looking at my copy of the original printing of the 1974 book "Jensen Wirth Pascal User Manual and Report", on page 31 - the case statement was defined not having an "else" or "otherwise" clause. The 1972 Pascal language report was revised in 1973 by Nicklaus Wirth - http://www.moorecad.com/standardpascal/The_Programming_Language_Pascal_1973.pdf
Taking a look at other editions of the Pascal language and their implementations for the case statement you can find:
- Turbo Pascal v1.0's case statement had the "else" clause
- BLS Pascal v1.2 had an "OTHERS:" clause in the case statement (page 16 of the BLS Programming Manual - http://www.nascomhomepage.com/pdf/BLSPAS.PDF)
- Apple's Object Pascal, developed jointly by the Clascal team at Apple Computer and Niklaus Wirth and defined in the Object Pascal Report by Larry Tesler "Object Pascal Report" in Structured Language World 9(3) 1985 used the case "otherwise" clause (this was also implemented in Turbo Pascal for the Macintosh).
There are also two ANSI-ISO standard specifications for Pascal and Extended Pascal. One could also look at the UCSD Pascal system implementation, Digital Research Pascal MT+, Microsoft Pascal, Free Pascal, and GNU Pascal for similarities and differences.
- ANSI-ISO Programming Language Pascal, ISO/IEC 7185:1990 - http://www.moorecad.com/standardpascal/iso7185.pdf - Case statement adheres to the original Pascal language report - no else or otherwise clause.
- ANSI-ISO Programming Language Extended Pascal, ANSI/IEEE770X3.160-1989, ISO/IEC 10206:1991 - http://www.moorecad.com/standardpascal/iso10206.pdf - Case statement has the "otherwise" clause.
- Object Oriented Extensions to Pascal, a draft report - http://www.moorecad.com/standardpascal/oopascal.txt
There were other syntax differences between Jensen-Wirth Pascal and Turbo Pascal version 1.0. These
differences were listed in the Turbo Pascal Reference Manual. While we heard a few complaints from teachers
of college courses that used Pascal textbooks, the differences did not matter to most developers on CP/M and DOS. As Turbo Pascal became the "de-facto standard" Pascal for industry and schools, textbooks and course notes were changed and many programming books appeared for Turbo Pascal. Here is the manual extract:
- TURBO Pascal closely follows the definition of Standard Pascal as defined by
K. Jensen and N. Wirth in the Pascal User Manual and Report. The few and
minor differences are described in section F.F. TURBO VS. STANDARD PASCAL
The TURBO Pascal language closely follows the Standard Pascal defined by
Jensen & Wirth in their User Manual and Report, with only minor differen-
cies introduced for the sheer purpose of efficieny. These differencies are desc-
ribed in the following. Notice that the extensions offered by TURBO Pascal
are not discussed.
F.1 Dynamic Variables
Dynamic variables and pointers use the standard procedures New, Mark, and
Release instead of the New and Dispose procedures suggested by Standard
Pascal. Primarily this deviation from the standard is far more efficient in terms
of execution speed and required support code, and secondly it offers compati-
bility with other popular Pascal compilers (e.g. UCSD Pascal).
The procedure New will not accept variant record specifications. This restric-
tion, however, is easily circumvented by using the standard procedure Get-
CP/M-80 version only: Because of the way local variables are handled dur-
ing recursion, a variable local to a subprogram must not be passed as a var-
parameter in recursive calls.
F.3 Get and Put
The standard procedures Get and Put are not implemented. Instead, the Read
and Write procedures have been extended to handle all I/O needs. The reason
for this is threefold: Firstly Read and Write gives much faster I/O, secondly
variable space overhead is reduced, as file buffer variables are not required,
and thirdly the Read and Write procedures are far more versatile and easier to
understand that Get and Put.
F.4 Goto Statements
A goto statement must not leave the current block.
F.5 Page Procedure
The standard procedure Page is not implemented, as the CP/M operating sy-
stem does not define a form-feed character.
F.6 Packed Variables
The reserved word packed has no effect in TURBO Pascal, but it is still allo-
wed. This is because packing occurs automatically whenever possible. For the
same reason, standard procedures Pack and Unpack are not implemented.
F.7 Procedural Parameters
Procedures and functions cannot be passed as parameters.
Some additional differences are also listed in the online Pascal FAQ file at
- "Actually, there are five other points on which TP differs from orginal Pascal
that were not mentioned in the manual, see the section http://www.moorecad.com/standardpascal/pascalfaq.html#Q. What are the differences between Borland Del - Q. What are the differences between Borland Delphi and the ISO 7185 standard, points 3, 6, 7, 8, and 9. Further, at the time TP was published in 1983, it also lacked variant records, not mentioned in the above manual."
Keep the comments coming - I will continue to blog each day this month, post emails I receive from members of the original Turbo Pascal development team, emails I receive from developers, and post links to additional historical and technical resources.
Go Pascal! Go Delphi 2009!
Tuesday, 4 November 2008
I really like these trips to history ... Thanks for writing them!
As you have the original documentation on hand - what was the Mark used for? I can't remember it - or maybe it didn't made it to the Turbo Pascal 3 for CP/M, which was the first TP I used (but not the first Pascal compiler - I started with HiSoft Pascal on ZX Spectrum and continued with VAX/VMS Pascal).
Wednesday, 5 November 2008
He, he "good" old days
If memory serves me, you're right, Halvard. Funny how quickly you forget all that house keeping. GetMem, FreeMem, New, Dispose, Mark and Release.
I'm not so sure that a programmer today, want to hear how cumbersome it was to write programs those days, but I must admit that I never miss those day. I love my Delphi!
Please login first in order for you to submit comments
- Page :
This is great - thanks :-)
I totally forgot the restriction on loop variables, but that reminds me of one key parameter to the longevity of a programming language: It must be easy and feel natural to write efficient code. SQL fails totally in this - many programmers cannot read an SQL statement and conclude if it is efficient or not, and things like LINQ aren't much better.