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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.134.233 with SMTP id pn9mr211159pbb.5.1399927513273; Mon, 12 May 2014 13:45:13 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c1no5314493igq.0!news-out.google.com!dz10ni39970qab.1!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 12 May 2014 15:45:12 -0500 Date: Mon, 12 May 2014 16:45:10 -0400 From: Peter Chapin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Weird error with Dynamic_Predicate References: In-Reply-To: Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-EhWYqy1GqD0lr03mocFw89xLGx3Ee/2V3qOcYpdUzhi27T3xMJ7q4n6BCqT1VpMR4KIkwASjsSTddD4!kCkXI2uHMcwIBwjpeV8Hl0gvP5U8jBkYSM4/CytWAB2eVlcHd9l/nFK8GFz3LpQ= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html 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.40 X-Original-Bytes: 1989 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Xref: news.eternal-september.org comp.lang.ada:19788 Date: 2014-05-12T16:45:10-04:00 List-Id: On 2014-05-12 15:47, mockturtle wrote: > package Prova is > type Identifier_Name is new > String > with Dynamic_Predicate => > ((for all I in Identifier_Name'Range => > Is_Alphanumeric (Identifier_Name (I)) > or Identifier_Name (I) = '_' > or Identifier_Name (I) = '.') > and > (not (Identifier_Name (Identifier_Name'First) in '0' .. '9')) > and > (Identifier_Name (Identifier_Name'First) /= '.') > and > Ada.Strings.Fixed.Count (String (Identifier_Name), ".") <= 1); This isn't related to your question but it seems like you might also want to be sure Identifier_Name'First actually refers to a character. In other words you should check that the Identifier_Name is not empty. Peter