* Please clear my doubt about variant record type
@ 2006-05-15 9:53 Sathish Veluswamy
2006-05-15 12:23 ` Georg Bauhaus
2006-05-15 18:31 ` Jeffrey R. Carter
0 siblings, 2 replies; 3+ messages in thread
From: Sathish Veluswamy @ 2006-05-15 9:53 UTC (permalink / raw)
Hi..
Can you please tell me at what time does the memory is allocated for an
variant record type. whether the memory is allocated at the time of
compilation or during run-time..??
With regards
Sathish Veluswamy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Please clear my doubt about variant record type
2006-05-15 9:53 Please clear my doubt about variant record type Sathish Veluswamy
@ 2006-05-15 12:23 ` Georg Bauhaus
2006-05-15 18:31 ` Jeffrey R. Carter
1 sibling, 0 replies; 3+ messages in thread
From: Georg Bauhaus @ 2006-05-15 12:23 UTC (permalink / raw)
Sathish Veluswamy wrote:
> Hi..
>
> Can you please tell me at what time does the memory is allocated for an
> variant record type. whether the memory is allocated at the time of
> compilation or during run-time..??
Depends.
type T(toggle: BOOLEAN) is record
...
end record;
Then
function foo(m: BOOLEAN) return INTEGER is
x: T(m);
begin
...
end;
The compiler will not know, in general, which variant
of T to choose for x, at compile time?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Please clear my doubt about variant record type
2006-05-15 9:53 Please clear my doubt about variant record type Sathish Veluswamy
2006-05-15 12:23 ` Georg Bauhaus
@ 2006-05-15 18:31 ` Jeffrey R. Carter
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey R. Carter @ 2006-05-15 18:31 UTC (permalink / raw)
Sathish Veluswamy wrote:
>
> Can you please tell me at what time does the memory is allocated for an
> variant record type. whether the memory is allocated at the time of
> compilation or during run-time..??
In general, no memory is allocated for types of any kind. Memory is
allocated for objects. All memory allocated for objects is allocated
during run time. The important question is where that memory is
allocated: on the stack or on the heap. For unconstrained objects of a
variant-record type, the answer is compiler dependent.
--
Jeff Carter
"I would never want to belong to any club that
would have someone like me for a member."
Annie Hall
41
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-15 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-15 9:53 Please clear my doubt about variant record type Sathish Veluswamy
2006-05-15 12:23 ` Georg Bauhaus
2006-05-15 18:31 ` Jeffrey R. Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox