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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae9506fd4dcf7090 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-22 09:14:15 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Concatenation and Characters User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Tue, 22 Oct 2002 16:13:43 GMT Content-Type: text/plain; charset=us-ascii References: <44hp9.807$_u6.205@nwrddc01.gnilink.net> <3DA5AE5F.3030902@attbi.com> <3DB03EF1.EE771923@mmm.com> <3DB43EB0.AAF4B38C@mmm.com> <3DB44B9C.80007@worldnet.att.net> <3DB466CB.7CE0BC59@mmm.com> <3DB4C9C4.1070003@worldnet.att.net> Fraser Wilson writes: > "David C. Hoos" writes: > > > You can just write > > return Array_Type (1 ..0); Ummm. No, you can't, actually. "Array_Type (1 ..0)" is not an expression, it's a subtype_mark. However, you can write this: return (1..0 => 123); if the component type is Integer, say. This is annoying, because you have to invent a completely junk value -- 123 is never used. Or if you like to emphasize the type, you can use a qualified expression: return Array_Type'(1..0 => 123); It really is a language design flaw that you can't have a zero-length positional aggregate. String_literals don't have this flaw, so if the component type happens to be a character type, you can say: return ""; > Thanks. I'm glad there was a good reason I felt dense. :) ;-) - Bob