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.15.167 with SMTP id f27mr1849877yhf.37.1408986134096; Mon, 25 Aug 2014 10:02:14 -0700 (PDT) X-Received: by 10.140.96.228 with SMTP id k91mr41273qge.23.1408986134059; Mon, 25 Aug 2014 10:02:14 -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!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!m5no3032144qaj.0!news-out.google.com!j6ni7969qas.0!nntp.google.com!i13no3033681qae.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 25 Aug 2014 10:02:13 -0700 (PDT) In-Reply-To: <55b1078f-dc26-4ae0-ac9f-5af0bfd90992@googlegroups.com> 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <84ce2caf-0a48-4952-8703-af1c0fabe583@googlegroups.com> Subject: Re: Integer Overflow Question. From: austin.obyrne769@btinternet.com Injection-Date: Mon, 25 Aug 2014 17:02:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2393 X-Received-Body-CRC: 4149908563 Xref: news.eternal-september.org comp.lang.ada:21909 Date: 2014-08-25T10:02:13-07:00 List-Id: On Monday, August 25, 2014 2:34:29 PM UTC+1, Aay Jay Chan wrote: > From the fact that you don't know how big your types are, it sounds like = you are using pre-defined types. In Ada, the prefered way is to define your= own types with the range that matches your requirements. That way, you wil= l know, at compile time, whether the compiler can implement those types on = the target platform. Apologies I haven't just learned that I can do that. I have indeed been using pre-defined integers and was quite unaware that I = could define my own types with a suitable range - I have only just learned = that from another source. =20 You see, I am not a well informed programmer and I am also pre-occupied wit= h the maths and the cryptography as well as The Ada side of things. Please Mr Chan,=20 Could you please set out the Ada-95 sourcecode for defining an integer vari= able 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 is brilliant - wish I had known earlier. Austin O'Byrne