Comparison of Pascal and Delphi: Difference between revisions

Content deleted Content added
Lightbot (talk | contribs)
Date links per wp:mosnum/Other
Line 21:
4. No "sized" dynamic variable allocation. Given a variant record, the size of a particular variant cannot be specified as per the standard. I.e., the following statement is invalid:
 
<source lang="pascal">
new(p, t)
</source>
 
Where t is a variant record tag type.
Line 27 ⟶ 29:
5. The functions "pack" and "unpack" are not implemented.
 
6. { and (*, } and *) are not synonyms of each other as required by the standard. IeI.e.:
 
<source lang="pascal">
{ comment *)
</source>
 
is not valid in Borland Delphi (Delphi uses the scheme of allowing the different comment types to indicate nested comments).
Line 37 ⟶ 41:
8. Numbers and booleans are not printed out in their "default" field widths, but are printed in the minimum amount of space. For example:
 
<source lang="pascal">
write(5);
write(555);
write(555);
</source>
 
is equivalent to:
 
<source lang="pascal">
write(5:1);
write(555:21);
write(555:12);
</source>
 
in Delphi, but:
 
<source lang="pascal">
write(5:TotalWidth);
write(555:TotalWidth);
write(555:TotalWidth);
</source>
 
in ISO 7185, where TotalWidth is implementation-defined.
Line 54 ⟶ 64:
For booleans:
 
<source lang="pascal">
write(false);
write(truefalse);
write(falsetrue);
</source>
 
is equivalent to:
 
<source lang="pascal">
write('false':5);
write('truefalse':45);
write('falsetrue':54);
</source>
 
in Delphi, but:
 
<source lang="pascal">
write('false':TotalWidth);
write('truefalse':TotalWidth);
write('falsetrue':TotalWidth);
</source>
 
in ISO 7185, where TotalWidth is implementation-defined.