comp.lang.ada
 help / color / mirror / Atom feed
From: stuart clark <clark.stuart.au@gmail.com>
Subject: Re: how to i get the type of a parameter specification is ASIS
Date: Mon, 25 Oct 2010 06:12:54 -0700 (PDT)
Date: 2010-10-25T06:12:54-07:00	[thread overview]
Message-ID: <7413fd4e-7cf6-494b-a73b-be0833372dac@g13g2000yqj.googlegroups.com> (raw)
In-Reply-To: 7a87e044-ad32-47bd-90cf-060d8c5b3a20@v20g2000yqb.googlegroups.com

On Oct 25, 10:07 pm, Julian Leyh <jul...@vgai.de> wrote:
> On 25 Okt., 13:55, stuart clark <clark.stuart...@gmail.com> wrote:
>
>
>
> > 1) i am getting the parameter_specification using
>
> >  params : Asis.Parameter_Specification_List :=
> >                  asis.Declarations.Parameter_Profile
> >                    (element);
>
> > 2) from params i am getting the parameter name using
>
> >  names: asis.Defining_Name_list :=
> >                        asis.declarations.Names(params(i));
>
> > 3) i am also getting the parameter mode_kind using
>
> > mode_kind : Asis.Mode_Kinds :=
> >                        asis.elements.mode_kind
> >                          (params(i));
>
> > it looks like this
>
> > param  =  b : in out float
> > name  =   b
> > mode kind  = AN_IN_OUT_MODE
>
> > but i also want the type of the parameter, eg float.
>
> > anybody know how ???
>
> from AdaBrowse source:
>
>       declare
>          Params : constant Parameter_Specification_List :=
>            Parameter_Profile (Decl);
>       begin
>          for I in Params'Range loop
>             declare
>                T : constant Type_Descriptor :=
>                  Type_Of (Declaration_Subtype_Mark (Params (I)));
>             begin
>                if T.Attrs = No_Attributes and then
>                   Is_Equal (T.Decl, The_Type)
>                then
>                   return True;
>                end if;
>             end;
>          end loop;
>       end;

thanks but which package is type_descriptor from ???



  reply	other threads:[~2010-10-25 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 11:55 how to i get the type of a parameter specification is ASIS stuart clark
2010-10-25 13:07 ` Julian Leyh
2010-10-25 13:12   ` stuart clark [this message]
2010-10-25 13:24     ` Julian Leyh
2010-10-25 13:26       ` stuart clark
2010-10-25 13:32       ` stuart clark
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox