comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Chapin <PChapin@vtc.vsc.edu>
Subject: Re: Weird error with Dynamic_Predicate
Date: Mon, 12 May 2014 16:45:10 -0400
Date: 2014-05-12T16:45:10-04:00	[thread overview]
Message-ID: <FbSdnZpOvJlFr-zORVn_vwA@giganews.com> (raw)
In-Reply-To: <e4d8e3db-99b6-49d4-85f3-839f178d4047@googlegroups.com>

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

  reply	other threads:[~2014-05-12 20:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 19:47 Weird error with Dynamic_Predicate mockturtle
2014-05-12 20:45 ` Peter Chapin [this message]
2014-05-12 20:52   ` mockturtle
2014-05-12 21:01 ` Adam Beneschan
2014-05-12 22:17   ` Randy Brukardt
2014-05-13  4:40     ` Simon Wright
2014-05-13 20:50       ` Simon Wright
2014-05-13  4:59 ` Shark8
2014-05-13 12:46 ` G.B.
2014-05-13 17:04   ` Martin
2014-05-13 18:55 ` mockturtle
2014-05-13 21:39   ` Georg Bauhaus
2014-05-14  7:30     ` mockturtle
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox