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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-08 12:05:36 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!drn From: Robert*@ Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp Date: 8 Oct 2001 11:38:23 -0700 Organization: Newsguy News Service [http://newsguy.com] Message-ID: <9psrqv016j9@drn.newsguy.com> References: <9pgr68$7pu1@news.cis.okstate.edu> <9phnic$9g5$1@nh.pace.co.uk> <5fkv7.134136$w7.19988807@news02.optonline.net> <9pski60j31@drn.newsguy.com> NNTP-Posting-Host: p-669.newsdawg.com X-Newsreader: Direct Read News 2.90 Xref: archiver1.google.com comp.lang.ada:13956 Date: 2001-10-08T11:38:23-07:00 List-Id: In article , "Mike says... > > >> There is nothing equivelant in C++ to declaring a new type integer >> with restricted range. It is simply not in the C++ language. > >I have shown you I can get the same functionality >without breaking a sweat. You did not even come close. In ada, when you declare a type of a restricted range, the compiler and run-time will check that variables of such type can have values in that range only. There is no such thing in C++ (nor in Java for that matter). Unless you code it yourself for every case and condition to do what the Ada compiler and run-time allready does automatically.