From: raycr@yahoo.com (Raymond Rawa)
Subject: Do subtypes inherit the attributes of the base type?
Date: 28 Aug 2001 13:52:06 -0700
Date: 2001-08-28T20:52:06+00:00 [thread overview]
Message-ID: <6062b16c.0108281252.1b436472@posting.google.com> (raw)
I'm migrating my code from VADS Ada83 to GHS Ada95 and I've got a type
that may be giving me trouble.
type Eng_Oil_Level_Calculation_Type is delta 1.0/2.0**10
range (System.Min_Int / 2) * 1.0/2.0**10 ..
(System.Max_Int / 2) * 1.0/2.0**10;
for Eng_Oil_Level_Calculation_Type'small use 1.0/2.0**10;
subtype Eng_Oil_Level_Type is Eng_Oil_Level_Calculation_Type
range -1.0..0.9990234375;
The legacy software is assuming that the subtype has the same 'small
value as the base type. Is this a safe assumption?
reply other threads:[~2001-08-28 20:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox