comp.lang.ada
 help / color / mirror / Atom feed
* Tick SIZE questions
@ 1994-10-17 10:29 Greg Gomberg
  1994-10-18 16:40 ` Norman H. Cohen
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Gomberg @ 1994-10-17 10:29 UTC (permalink / raw)


Apology: if these questions have been answered in c.l.a or somewhere else I
should have looked then I apologise.

Q1. What exactly does the LRM mean about the difference between 'SIZE as
applied to an object and to a (sub)type - bits allocated vs "minimum number of
bits..." LRM13.7.2(5). Does "minimum number of bits" mean:

a   the size should be given as if pragma PACK had been used, or

b   the size should be the least upper bound of the size of all objects of
    this (sub)type with all possible combinations of discriminant values.

Or does it mean both? or something else entirely?

We have a compiler here that implements something like (a). For example, a
record type (no discriminants) has 'SIZE 688, but a variable of that type has
'SIZE 704. What is this useful for? (This compiler is not generally available
and I am not free to identify it - for those who know, it's named after an
endangered species.)

Q2. What should 'SIZE give for a variable which is a formal parameter of a
sub-program? The same as when appliefd to the actual parameter?

Q3. Might 'SIZE work differently in any respect if the (sub)type or object
concerned is a formal parameter of a generic?

Q2 & Q3 sound silly to me, but the same compiler (no name, no blame) surprises
me with its answers and the people who wrote it know Ada better than I do.

TIA
Greg G 
------------------------------------------------                         
Logica's link but my words are my responsibility                     
Greg Gomberg, Logica 68 Newman St London W1A 4SE      
+44 71 637 9111 x1360   gomberga@logica.co.uk     



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-10-18 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-17 10:29 Tick SIZE questions Greg Gomberg
1994-10-18 16:40 ` Norman H. Cohen

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