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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,43574d97231a5f7a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-17 04:22:31 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!logica.co.uk!gomberga From: gomberga@logica.co.uk (Greg Gomberg) Subject: Tick SIZE questions Message-ID: <1994Oct17.102945.1@condor> Sender: news@carmen.logica.co.uk (News Manager Account) Nntp-Posting-Host: condor.logica.co.uk Organization: Logica Ltd. Date: Mon, 17 Oct 1994 10:29:45 GMT Date: 1994-10-17T10:29:45+00:00 List-Id: 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