From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72340e997bfd5289 X-Google-Attributes: gid103376,public From: "James E. Hopper" Subject: Re: array size Date: 1999/12/11 Message-ID: <111219991626224120%hopperj@macconnect.com>#1/1 X-Deja-AN: 559504916 Content-Transfer-Encoding: 8bit References: <101219991605504828%hopperj@macconnect.com> <3851d15b_1@news1.prserv.net> Organization: http://extra.newsguy.com Content-Type: text/plain; charset=ISO-8859-1 User-Agent: YA-NewsWatcher/4.2.3 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-11T00:00:00+00:00 List-Id: well i tried adding for Day_Array_Type'Size use 7 * Preset_Array_Type_Size; this won't compile either. i get: test.adb:48:33: size for "Day_Array_Type" too small, minimum allowed is 1120 gnatmake: "test.adb" compilation error could this be a gnat bug?? jim In article <3851d15b_1@news1.prserv.net>, Matthew Heaney wrote: > In article <101219991605504828%hopperj@macconnect.com> , "James E. > Hopper" wrote: > > > type Preset_Array_Type is array ( Preset_Type ) of Frequency_Type; > > pragma pack (Preset_Array_Type); -- RAD SOLARIS PORT > > for Preset_Array_Type'Size use 6 * Frequency_Type'Size; > > Always do this for composite types: > > Preset_Array_Type_Size : constant := 6 * Frequency_Type'Size; > for Preset_Array_Type'Size use Preset_Array_Type_Size; > > > > -- We tried the following just for giggles but interestingly, > > -- the compiler says that Preset_Array_Type'Size isn't static!! > > -- for Day_Array_Type'Size use 7 * Preset_Array_Type'Size; > > It said that because composite types (including arrays) are always > nonstatic; see RM95 4.9. > > The solution is easy enough: > > for Day_Array_Type'Size use 7 * Preset_Array_Type_Size; > > or better > > Day_Array_Type_Size : constant := 7 * Preset_Array_Type_Size; > for Day_Array_Type'Size use Day_Array_Type_Size; > > > -- > Time and again the nation's courts have ruled that creationism, as a > religious dogma, cannot be taught in science classes. Now, creationists > are advancing a new tactic: eliminating the teaching of evolution and > other sciences that complement evolution, such as geology, paleontology, > and biological anthropology. By doing so, they are not only endangering > church-state separation but also seriously jeopardizing the science > education of future generations. > > http://www.campusfreethought.org/sos/