From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 25 Sep 92 16:20:00 GMT From: sun-barr!cs.utexas.edu!usc!rpi!psinntp!psinntp!vitro.com!v7.vitro.com!v7. vitro.com!news@ames.arc.nasa.gov (M. J. Mangieri) Subject: Derived types and portability Message-ID: <1992Sep25.112001.261@v7.vitro.com> List-Id: 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