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.236.191.37 with SMTP id f25mr2078228yhn.44.1408989400306; Mon, 25 Aug 2014 10:56:40 -0700 (PDT) X-Received: by 10.140.36.234 with SMTP id p97mr45833qgp.14.1408989400288; Mon, 25 Aug 2014 10:56:40 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i13no3063044qae.1!news-out.google.com!j6ni8038qas.0!nntp.google.com!m5no3061625qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 25 Aug 2014 10:56:40 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=5.81.69.184; posting-account=j15vhwoAAABH_eywb4s2_dWxAM2kkx7W NNTP-Posting-Host: 5.81.69.184 References: <9c5de333-276c-4e3a-be5a-4e5a98cdaa1d@googlegroups.com> <440bf1f1-3e98-47ac-b0c0-f73f170a3603@googlegroups.com> <55b1078f-dc26-4ae0-ac9f-5af0bfd90992@googlegroups.com> <84ce2caf-0a48-4952-8703-af1c0fabe583@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Integer Overflow Question. From: austin.obyrne769@btinternet.com Injection-Date: Mon, 25 Aug 2014 17:56:40 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2369 X-Received-Body-CRC: 3398333030 Xref: number.nntp.dca.giganews.com comp.lang.ada:188660 Date: 2014-08-25T10:56:40-07:00 List-Id: On Monday, August 25, 2014 6:21:43 PM UTC+1, Simon Wright wrote: > austin.obyrne769@btinternet.com writes: > > > > > Could you please set out the Ada-95 sourcecode for defining an integer > > > variable called "CipherText" in the range say of 8 decimal digits to > > > 12 decimal digits. I can do the others myself once I know what to do. > > > > This may help: > > > > with Ada.Text_IO; > > procedure Obyrne is > > type Ciphertext_Integer is range -10 ** 12 .. 10 ** 12; > > begin > > Ada.Text_IO.Put_Line > > ("first is " & Ciphertext_Integer'Image (Ciphertext_Integer'First) > > & ", last is " & Ciphertext_Integer'Image (Ciphertext_Integer'Last)); > > end Obyrne; > > > > With up-to-date GNAT, this outputs > > > > first is -1000000000000, last is 1000000000000 Many thanks Simon Can I go ahead and use 'Ciphertext' eg. CipherText := residue + N.N any where in a program after that so long as I stay in the declared range? - I shall experiment with this - Thanks Austin