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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,751584f55705ddb7 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Side-effect arithmetic again [was: Ada ... in embedded systems] Date: 1996/03/26 Message-ID: #1/1 X-Deja-AN: 144186927 references: <31499D21.1DA6@escmail.orl.mmc.com> <827432438.26126@assen.demon.co.uk> <4ivnr9$86o@dayuc.dayton.saic.com> <4j7dcl$dfu@dayuc.dayton.saic.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-26T00:00:00+00:00 List-Id: John Volan said "> procedure Increment (This : in out Item; By: in Positive) is > begin > This := Item'Val(Item'Pos(This) + By); > end Increment; is that it doesn't just limit the "By" parameter to Standard.Positive, it also limits the "This" parameter to possibly a relatively small range of the Item type." Well I can't get particularly upset by that , but if you are, just change this to Item'Val (Item'Pos(This) + Positive'Pos (By)).