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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,30581de1aa7f8b46 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 03 May 2006 16:04:48 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1146620953.878484.308430@i40g2000cwc.googlegroups.com> Subject: Re: Discriminant within discriminants Date: Wed, 3 May 2006 16:05:08 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-XbXChQlGC0aUjKA0RsFEVkaW7vB7w1HavsARIPC/CveyfVm4IVpnPLjmZn+JiQg6zeY7N47M0R48skL!eTbOisdlu+9ctSWCczM6fjdL471JuIaNAGdDZVMunafz/PfYXW1iL2GK9ZYSZNjHiDlJKWBxlf7r!QICTJ1tb+GCrUA== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:4052 Date: 2006-05-03T16:05:08-05:00 List-Id: "Jeffrey R. Carter" wrote in message news:M656g.929814$x96.584697@attbi_s72... ... > > QUESTION : can i declare a message with a type and size in the one > > statement without using the intermediate message. > > Msg : Message_Types.In_Messages := > (Kind => Message_Types.Dispense_Acknowledgement, > Acknowledgements => > (Size => 8, Dispense_Acks => (1 .. 8 => Thing) ) ); > > This requires that a value of the (undefined) type Acks be available > (Thing in the example). If you have Ada 2005 support, you can use the default initialization value to avoid the need to specify a particular value: Msg : Message_Types.In_Messages := (Kind => Message_Types.Dispense_Acknowledgement, Acknowledgements => (Size => 8, Dispense_Acks => (1 .. 8 => <>) ) ); Randy.