Tim Prince writes:
> At 04:02 PM 12/15/2003, Richard Maine wrote:
>
> >In general, 64-bit mode means 64-bit addresses. That is *ALL*....
> >You might end up wanting to use 64-bit integers in some
> >contexts if the reason you need 64-bit addresses is that you have huge
> >arrays, but it does not necessarily follow that default integers are
> >64 bits.
>
> 30 years ago, the Fortran standard did suggest that integers and reals
> should occupy the same storage space.
As Peter mentions, the standard still requires it for default integers
and default reals (or anyway, that the effect be as though it were so
- I'll ignore complicated implementation strategies). This has not
changed.
But this is orthogonal to both the original question and to my comment.
The size of default integers and default reals is required to be the
same, but neither has anything directly to do with address space.
You can have 32-bit default reals/integers with 64-bit addresses or
vice versa. You can also use nondefault sizes, though the old code
that you mention isn't likely to do so.
> When you have millions of lines of code from that era which still
> work, hardware which fits that model has its uses.
None of the prior discussion has anything effect on such code, which
was my point in the first place. I doubt that you have millions of
lines of old code that assumes 32-bit addresses. Assumptions of
32-bit reals and 32-bit integers are *NOT* necessarily invalidated
by what is most commonly meant by 64-bit hardware today. You
can still use 32-bit integer array sizes and indices - those arrays
just won't be able to be as large as 64-bit system could otherwise
allow.
Now if you have millions of lines of old code that assumes 32-bit
integers, and you want to apply that code to problems that need
integers to be bigger than 32 bits, then you'll just have problems.
Depending on how deeply the 32-bit assumptions are burried, it
can require almost a complete rewrite to undo them. There are
often compiler switches to handle the simple cases, but there exists
lots of code that doesn't fit in the simple cases. There is no
simple solution for that. Neither hardware nor software is going to
be able to fix all those kinds of cases - it requires the attention
of a human - possibly quite a lot of attention.
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|