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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,daf3a0910fbd55c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!g13g2000yqj.googlegroups.com!not-for-mail From: stuart clark Newsgroups: comp.lang.ada Subject: Re: how to i get the type of a parameter specification is ASIS Date: Mon, 25 Oct 2010 06:12:54 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7413fd4e-7cf6-494b-a73b-be0833372dac@g13g2000yqj.googlegroups.com> References: <7a87e044-ad32-47bd-90cf-060d8c5b3a20@v20g2000yqb.googlegroups.com> NNTP-Posting-Host: 115.64.246.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288012374 3872 127.0.0.1 (25 Oct 2010 13:12:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 25 Oct 2010 13:12:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g13g2000yqj.googlegroups.com; posting-host=115.64.246.86; posting-account=MZK52AoAAABSzwZnz7ceKVzE2LKWwfyu User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14747 Date: 2010-10-25T06:12:54-07:00 List-Id: On Oct 25, 10:07=A0pm, Julian Leyh wrote: > On 25 Okt., 13:55, stuart clark wrote: > > > > > 1) i am getting the parameter_specification using > > > =A0params : Asis.Parameter_Specification_List :=3D > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0asis.Declarations.Parameter_Profile > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(element); > > > 2) from params i am getting the parameter name using > > > =A0names: asis.Defining_Name_list :=3D > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0asis.declarations.Names(= params(i)); > > > 3) i am also getting the parameter mode_kind using > > > mode_kind : Asis.Mode_Kinds :=3D > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0asis.elements.mode_kind > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(params(i)); > > > it looks like this > > > param =A0=3D =A0b : in out float > > name =A0=3D =A0 b > > mode kind =A0=3D AN_IN_OUT_MODE > > > but i also want the type of the parameter, eg float. > > > anybody know how ??? > > from AdaBrowse source: > > =A0 =A0 =A0 declare > =A0 =A0 =A0 =A0 =A0Params : constant Parameter_Specification_List :=3D > =A0 =A0 =A0 =A0 =A0 =A0Parameter_Profile (Decl); > =A0 =A0 =A0 begin > =A0 =A0 =A0 =A0 =A0for I in Params'Range loop > =A0 =A0 =A0 =A0 =A0 =A0 declare > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0T : constant Type_Descriptor :=3D > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Type_Of (Declaration_Subtype_Mark (Par= ams (I))); > =A0 =A0 =A0 =A0 =A0 =A0 begin > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if T.Attrs =3D No_Attributes and then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Is_Equal (T.Decl, The_Type) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return True; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0end if; > =A0 =A0 =A0 =A0 =A0 =A0 end; > =A0 =A0 =A0 =A0 =A0end loop; > =A0 =A0 =A0 end; thanks but which package is type_descriptor from ???