Differences Between Standard Pascal and Delphi
1. The way procedures and functions can be passed as parameters differs: Delphi requires explicit procedural types to be declared where Standard Pascal does not.
2. Delphi does not support so called 'intraprocedural gotos', in which goto statements may reference targets outside the current procedure/function body.
3. Standard Pascal has file 'buffer variables', together with 'get' and 'put' standard procedures that operate on them. Neither are supported in Delphi.
4. Given a variant record in Standard Pascal, the size of a particular variant can be specified. Delphi does not support this form of 'sized' dynamic variable allocation:
new(p, t) //where t is a variant record tag type; does not compile in Delphi5. The functions 'pack' and 'unpack' are not implemented in Delphi.
6. The Delphi compiler does not treat { and (*, } and *) as synonyms like Standard Pascal requires. In other words,
{ comment *)is not valid in Delphi. Instead, Delphi uses the scheme of allowing the different comment types to indicate nested comments.
7. Delphi does not replace eoln with space as the Pascal standard requires. When reading through the end of a line, the eoln character is supposed to be replaced with a space in ISO 7185. Instead, reading through eoln in Delphi gives the character code for carriage return (13), followed by line feed (10).
8. Numbers and booleans are not printed out in their 'default' field widths by Delphi's version of the Write and WriteLn standard procedures, being instead printed in the minimum amount of space. For example, in Delphi,
write(5); write(55);is equivalent to:
write(5:1); write(55:2);However, Standard Pascal requires it to be equivalent to the following (TotalWidth is implementation-defined):
write(5:TotalWidth); write(55:TotalWidth);Similarly, for booleans,
write(false); write(true);is equivalent to
write('false':5); write('true':4);in Delphi, but
write('false':TotalWidth); write('true':TotalWidth);in ISO 7185.
9. Temporary files are not supported by Delphi using traditional Pascal I/O - executing Reset or Rewrite results in an error, where under Standard Pascal it opens a temporary file that exists for the duration of the program before being automatically deleted.
10. Notwithstanding the fact Delphi still allows using much of the traditional Pascal RTL, Delphi-specific library functionality is generally implemented in ordinary Delphi code that uses, rather than adds to, compiler-provided intrinsics. This philosophy contrasts to Standard Pascal, whose RTL must be provided by the compiler. For example, in Standard Pascal, the 'file' type is an intrinsic type - sort of like a record, but another compiler-defined type alongside records. In contrast, the TFileStream class in Delphi is an ordinary Delphi class written in ordinary Delphi code. Similarly, the Read, ReadLn, Write and WriteLn standard procedures have signatures that are not themselves legal Pascal signatures. While Delphi still implements them, only vary rarely do Delphi-specific RTL routines require similarly special handling: rather, the language was evolved to include features such as 'open arrays', default parameters and procedural overloading that can be used by user-written routines too.
Read more about this topic: Comparison Of Pascal And Delphi
Famous quotes containing the words differences between, differences, standard, pascal and/or delphi:
“The differences between revolution in art and revolution in politics are enormous.... Revolution in art lies not in the will to destroy but in the revelation of what has already been destroyed. Art kills only the dead.”
—Harold Rosenberg (19061978)
“The mother must teach her son how to respect and follow the rules. She must teach him how to compete successfully with the other boys. And she must teach him how to find a woman to take care of him and finish the job she began of training him how to live in a family. But no matter how good a job a woman does in teaching a boy how to be a man, he knows that she is not the real thing, and so he tends to exaggerate the differences between men and women that she embodies.”
—Frank Pittman (20th century)
“Liberty requires opportunity to make a livinga living decent according to the standard of the time, a living which gives a man not only enough to live by, but something to live for.”
—Franklin D. Roosevelt (18821945)
“The will is one of the chief factors in belief, not that it creates belief, but because things are true or false according to the aspect in which we look at them. The will, which prefers one aspect to another, turns away the mind from considering the qualities of all that it does not like to see; and thus the mind, moving in accord with the will, stops to consider the aspect which it likes and so judges by what it sees.”
—Blaise Pascal (16231662)
“At Delphi I prayed
to Apollo
that he maintain in me
the flame of the poem
and I drank of the brackish
spring there....”
—Denise Levertov (b. 1923)