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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a79ba897d64210ea X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!news.rediris.es!news.um.es!not-for-mail From: "Francisco J. Montoya" Newsgroups: comp.lang.ada Subject: Re: TYPE'Size in static expression Followup-To: comp.lang.ada Date: Mon, 24 Oct 2005 12:56:31 +0200 Organization: Dpto. Informatica y Sistemas (Universidad de Murcia) Message-ID: <435CBDDF.3040607@dif.andthis.um.es> References: <4358A12B.4030601@dif.andthis.um.es> Reply-To: fmontoya.removethis@dif.andthis.um.es NNTP-Posting-Host: montoya.dif.um.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: unida.um.es 1130151508 23172 155.54.1.41 (24 Oct 2005 10:58:28 GMT) X-Complaints-To: usenet@news.um.es NNTP-Posting-Date: 24 Oct 2005 10:58:28 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: es-es, es Xref: g2news1.google.com comp.lang.ada:5902 Date: 2005-10-24T10:58:28+00:00 List-Id: Thank you very much for your quick answer, Dmitry. That, indeed, solved my problem, but I still do not finish in=20 understanding why what I wrote did not work. The expression I wrote is=20 supposed to be of "Universal Integer Type", isn't it? So adding the=20 explicit type "Integer" to the constant definition should not make much=20 difference. Anyhow, I'm just a newbie and a clumsy Ada programmer, so don't pay too=20 much attention to what I say ;) Regards, and thanks again. Dmitry A. Kazakov escribi=F3: > On Fri, 21 Oct 2005 10:04:59 +0200, Francisco J. Montoya wrote: >=20 >=20 >>My first attempt was to make some definitions like the following: >> >> Buffer_Size : constant :=3D 1024; -- 1Kb buffer >> Num_Elements : constant :=3D 8 * Buffer_Size / BaseType'Size; -- Wron= g! >=20 >=20 > Num_Elements : constant Integer :=3D > 8 * Buffer_Size / BaseType'Size; >=20 >=20 >> type Buffer is array (1..Num_Elements) of BaseType; >=20 >=20 --=20 Francisco J. Montoya Depto. Informatica y Sistemas, Facultad de Informatica (E-30071 Campus de Espinardo) Universidad de Murcia (Spain) Voice: +34 968 364620, Fax: +34 968 364151, e-mail: fmontoya AT dif.um.es