From: | gdemont@my-deja.com |
Newsgroups: | comp.compilers |
Date: | 16 Nov 2000 15:02:10 -0500 |
Organization: | Deja.com - Before you buy. |
References: | 00-11-046 00-11-082 |
Keywords: | Pascal, design |
Posted-Date: | 16 Nov 2000 15:02:10 EST |
Gabor DEAK JAHN:
> Why should Pascal *as a language* have signed and unsigned integers of
> various flavors?
To make portable programs.
> The standard calls for a single integer type as a starting
> point but based on this, it is possible and very easy to define any subrange
> type, either signed or unsigned, by the compiler or by you in your own
> programs.
A subrange is a thing, the kind of animal containing the value is
another. A 0..255 subrange of a 32-bit type is not the same as a byte.
> That having said, as far as I know, all contemporary Pascal compilers do
> have unsigned longs.
Are they for all 8,16,32,64-byte types ? With the same names ?
If you read sources that must compile on several Pascal compilers, the
same names means other things...
The real "serious" descendent of Pascal, Ada, brings signed and
unsigned types for all these lengths...
G.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.