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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9ce095aba33fe8d0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!news.glorb.com!easynet-quince!easynet.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Negative float problem Date: Thu, 03 Nov 2005 14:06:34 +0100 Organization: Adalog Message-ID: References: <1130351574.313991.229420@g14g2000cwa.googlegroups.com> <10mspnley7gzu$.1swtj67sv0ldr$.dlg@40tude.net> <38tcpxwxfigo$.18ysjyp9ml92c$.dlg@40tude.net> <2ybc7t4au7g$.166dxwfrds1so$.dlg@40tude.net> <18nrnlg9zzl5a.k8rl3ajwauqi.dlg@40tude.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1131026486 9118 195.25.228.57 (3 Nov 2005 14:01:26 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 3 Nov 2005 14:01:26 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:6141 Date: 2005-11-03T14:06:34+01:00 List-Id: Jeffrey R. Carter a �crit : > Jean-Pierre Rosen wrote: > >> Since you are new to Ada, there is something that you must understand. >> The Ada language has been designed in such a way that either a >> construct always works, and works the same with every implementation, >> or does not compile. There is no space for "sometimes", "maybe", >> "depends", and other things like that that are common in other languages. > > > Mostly. There are a number of "implementation defined" parts of the > language. What's the range of type Integer? At least that of a 16-bit > signed twos-complement integer, but often more. Luckily, you can define > your own integer types that match your application's needs, and not have > to rely on the predefined numeric types, as you have to do in most other > languages. > > SPARK gets rid of most implementation-defined things, but type Integer > is still in there ... > Sure, there are parts that are "implementation defined", but at least, you know precisely what they are. And bear in mind that "implementation defined" does not necessarily mean "non portable" (depends on your definition of "portable"). For example: type Biggest_Int is range System.Min_Int .. System.Max_Int; The range will vary with the implementation, but it will always be the biggest integer type available on your system. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr