* ASIS questions
@ 2005-08-08 21:22 James Alan Farrell
2005-08-09 8:41 ` Jean-Pierre Rosen
0 siblings, 1 reply; 3+ messages in thread
From: James Alan Farrell @ 2005-08-08 21:22 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Hi all,
A couple questions on ASIS:
1. I have a variant record declaration. I can find all the fields,
including those inside the case statement. But I cannot find the
parameters. How do I get the parameters of a variant record?
2. I have an record aggregate, and I need to find the record
declaration. In particular, I need to know how many fields the record
contains when I have something like (A, B, others => C). How do I find
the record declaration?
Thanks,
James Alan Farrell
[-- Attachment #2: jfarrell.vcf --]
[-- Type: text/x-vcard, Size: 88 bytes --]
begin:vcard
fn:James Alan Farrell
n:Farrell;James
org:GrammaTech
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ASIS questions
2005-08-08 21:22 ASIS questions James Alan Farrell
@ 2005-08-09 8:41 ` Jean-Pierre Rosen
2005-08-09 14:10 ` James Alan Farrell
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Pierre Rosen @ 2005-08-09 8:41 UTC (permalink / raw)
James Alan Farrell a �crit :
> Hi all,
> A couple questions on ASIS:
> 1. I have a variant record declaration. I can find all the fields,
> including those inside the case statement. But I cannot find the
> parameters. How do I get the parameters of a variant record?
Asis.Declarations.Discriminant_Part
Note that these components are called "discriminants", not "parameters".
That can explain why you didn't find them...
> 2. I have an record aggregate, and I need to find the record
> declaration. In particular, I need to know how many fields the record
> contains when I have something like (A, B, others => C). How do I find
> the record declaration?
>
Corresponding_Expression_Type of the Aggregate will return the
corresponding type declaration.
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ASIS questions
2005-08-09 8:41 ` Jean-Pierre Rosen
@ 2005-08-09 14:10 ` James Alan Farrell
0 siblings, 0 replies; 3+ messages in thread
From: James Alan Farrell @ 2005-08-09 14:10 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]
Jean-Pierre Rosen wrote:
> James Alan Farrell a �crit :
>
>> Hi all,
>> A couple questions on ASIS:
>> 1. I have a variant record declaration. I can find all the fields,
>> including those inside the case statement. But I cannot find the
>> parameters. How do I get the parameters of a variant record?
>
> Asis.Declarations.Discriminant_Part
>
> Note that these components are called "discriminants", not "parameters".
> That can explain why you didn't find them...
>
I was look through asis.definitions and rying everything that had to do
with variants. No wonder! :)
>> 2. I have an record aggregate, and I need to find the record
>> declaration. In particular, I need to know how many fields the record
>> contains when I have something like (A, B, others => C). How do I
>> find the record declaration?
>>
> Corresponding_Expression_Type of the Aggregate will return the
> corresponding type declaration.
>
I swear I tried that yesterday and it didn't work. Today it does. Must
have gotten something wrong somewhere before calling
corresponding_expression_type.
Thanks for your help!
JAF
[-- Attachment #2: jfarrell.vcf --]
[-- Type: text/x-vcard, Size: 88 bytes --]
begin:vcard
fn:James Alan Farrell
n:Farrell;James
org:GrammaTech
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-09 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-08 21:22 ASIS questions James Alan Farrell
2005-08-09 8:41 ` Jean-Pierre Rosen
2005-08-09 14:10 ` James Alan Farrell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox