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,287f73fa8b0c840d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 25 Apr 2005 12:37:17 -0400 From: James Alan Farrell Organization: GrammaTech, Inc. User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Syntax question: new with a constrained subtype indication References: <426d10d1$1_2@newsfeed.slurp.net> <426d183e$0$30465$ba620e4c@news.skynet.be> In-Reply-To: <426d183e$0$30465$ba620e4c@news.skynet.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: fw.grammatech.com Message-ID: <426d1d0e$1_2@newsfeed.slurp.net> X-Trace: newsfeed.slurp.net 1114447118 209.4.89.67 (25 Apr 2005 11:38:38 -0500) X-Original-NNTP-Posting-Host: 209.4.89.67 Path: g2news1.google.com!news4.google.com!newsfeed.stanford.edu!nntp-out.svc.us.xo.net!nntp1-feeder.SJ.svc.us.xo.net!newsfeed.concentric.net!sjc1.nntp.concentric.net!newsfeed-3001.bay.webtv.net!news.moat.net!newsfeed.slurp.net!not-for-mail Xref: g2news1.google.com comp.lang.ada:10690 Date: 2005-04-25T12:37:17-04:00 List-Id: Adrien Plisson wrote: > James Alan Farrell wrote: > >> V := new Vector range 1 .. 10; > > > Vector is a composite type, not a scalar type, so i don't think you can > apply a scalar_constraint to this type. (but you are right, the grammar > does not forbid it explicitly). > Actually I just noticed about the scalar vs composit. So is there any time when using a scalar constraint is reasonable/allowed with the new operator? I will take your advice and read 3.2.2. I hope I wont have to read the *WHOLE* text to answer this one question -- it is too large and I get lost and confused ;) > have you looked at 3.2.2 and subsequent chapters to see what is said > about constraints ? hint: often things are not forbidden in the grammar > but additional constraints can be found by reading the whole text. > Thank you (and Alex) for your rapid replies. James