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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a97feceab5b57877 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!news.ett.com.ua!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Saturation arithmetic woes. Date: Wed, 29 Jul 2009 11:14:34 -0700 Organization: ETT newsserver Message-ID: References: <1a16b458-0201-4320-9787-2836ed58f991@e27g2000yqm.googlegroups.com> NNTP-Posting-Host: 134.sub-75-210-175.myvzw.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.ett.com.ua X-Notice: Filtered by postfilter v. 0.6.1 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) Xref: g2news2.google.com comp.lang.ada:7420 Date: 2009-07-29T11:14:34-07:00 List-Id: xorque wrote: > generic > type Discrete_Type is (<>); This may be any discrete type, including an enumeration type. Arithmetic is not defined for enumeration types, so you do not automatically get "+" for this. You either need to explicitly require a "+" function ("with function "+" ...), or use a generic formal type that does include "+": "is range <>" or "is mod <>". -- Jeff Carter "What I wouldn't give for a large sock with horse manure in it." Annie Hall 42