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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b61052ba3fdc8c26 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-06 08:09:41 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsgate.cistron.nl!fr.clara.net!heighliner.fr.clara.net!157.161.139.35.MISMATCH!99032406!news.imp.ch!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Integers and Mathematical Correctness Date: Tue, 6 Nov 2001 10:54:18 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9s913c$lc7$1@nh.pace.co.uk> References: <1f26o22.1xfvwvo111pfi4N%csampson@inetworld.net> <9rrsou$bl1$1@nh.pace.co.uk> <3BE4232D.6CC9ACA3@adaworks.com> <9s68pu$9j5$1@nh.pace.co.uk> <3BE766F6.3D014CD8@worldnet.att.net> <9s7ulq02pdq@drn.newsguy.com> <3BE7F836.B9B78AB5@worldnet.att.net> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1005062060 21895 136.170.200.133 (6 Nov 2001 15:54:20 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 6 Nov 2001 15:54:20 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:15918 Date: 2001-11-06T15:54:20+00:00 List-Id: ...And as constants (probably #define...), they can easily be overriden by the inclusion of another header file or within the file itself. Nothing stops you from doing: "#define FLT_MAX 1.0" There's nothing to stop you from accidentally having that appear in some other header file that is brought into your code invisibly. The sizeof is at least something the compiler is likely to make sure is correct - but it isn't as useful as knowing what the 'Mantissa or 'Exponent of a float is. As I said, it isn't as if other languages don't give you *some* of the things you get from Ada's Attributes in some alternate form. Its just that the Ada Attributes are generally more useful and more safe - and probably more breadth of coverage as well. You get a *lot* of power from the attributes and when I taught Ada to newbies, I always tried to cover them as much as I could - they are very useful and introduce newbies to The Ada Way... MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "James Rogers" wrote in message news:3BE7F836.B9B78AB5@worldnet.att.net... > "peter@nospam" wrote: > > I think this was the point Marin was making. C has header files that > define minimum and maximum values for numeric types, but the use > of those header files is optional. Furthermore, those minimum and > maximum values are not part of the type definition. Instead, they > are simply constants defined in several header files. >