* Derived types and portability
@ 1992-09-25 16:20 M. J. Mangieri
0 siblings, 0 replies; only message in thread
From: M. J. Mangieri @ 1992-09-25 16:20 UTC (permalink / raw)
I have always achieved portability by using user-defined types such as:
type MY_INTEGER is range 0 .. 2**32-1;
However, I recently came across a document that suggested using derived types
in combination with length representation clauses to achieve portability:
type MY_INTEGER is new INTEGER;
for MY_INTEGER'SIZE use 32;
Are these two methods equivalent? I understand the second case to simply
reserve more storage. For example, if the platform is a PC, where INTEGER is 16
bits, I would think the run-time would still enforce a range of values that are
limited to 16 bits, but give you a word size of 32 bits.
Is this correct, or am I missing something?
__________________________________________________________________
/ Michael J. Mangieri Internet: mmangieri@vitro.com
__ / Vitro Corporation Voice: (301) 231-3016
\ / MX-SP 4-2311 FAX: (301) 231-1233
\ / 14000 Georgia Ave.
* Silver Spring, MD 20906-2972
"Everything should be made as simple as possible, but not simpler."
- A. Einstein
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-09-25 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-09-25 16:20 Derived types and portability M. J. Mangieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox