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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Learning Ada (Was: unsigned type) Reply-To: anon@anon.org (anon) References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <62792744-daca-437b-bdee-4b8a21f7ce27@j32g2000yqh.googlegroups.com> <82oq45tj2uu26u6ecsgq70bsjskr9dvghr@4ax.com> <878wj61bpo.fsf_-_@nbi.dk> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 03 Jul 2009 22:20:10 GMT NNTP-Posting-Host: 12.64.54.128 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1246659610 12.64.54.128 (Fri, 03 Jul 2009 22:20:10 GMT) NNTP-Posting-Date: Fri, 03 Jul 2009 22:20:10 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6828 Date: 2009-07-03T22:20:10+00:00 List-Id: Standards are the way to go. How would you like to define a Boolean alone with the universal_integer and universal_real types. Then have to define operations for all of those types for every program. All you would have to do is rebuild the Standard specification package and include a body for the operations. Now, if someone needs to modify the program then they need the new Standard package. But wait a minute, without the built-in standards and the compiler understatement of those types (Boolean, universal_integer and universal_real) the compiler could not understand how to build you new Standard package. The compiler must have a bases for those standards in order to allow you to redefine those standard. Even in GNAT you can rewrite the Standard package, but it still will fall back and use the built-in Standard operations. Also, Its kind of funny. Other than me not one person here tried to answer the original person question from "unsigned type". I saw the title "unsigned type" and stated they are defined in predefined in the Interface package. But if he looked at the package he would get an example of what he could do to define a special type. But no one else tried to define the type he was truly looking for. Some gave a sentence or two stating that CARDINAL was like a Natural or etc. But no one posted a statement like type CARDINAL is ... ; and filled in the details, which is defined as a special type. Now, if Ludovic Brenta, was correct that most Ada programmers prefer to create their own types, then where were those programmers posting that type of statement for an answer. In <878wj61bpo.fsf_-_@nbi.dk>, Jacob Sparre Andersen writes: >Rob Solomon wrote: > >> Ada as a Second Language is a far better book to learn from. My >> earlier posts were because I first opened the John Barnes book and >> that left me w/ more questions than answers. It introduces very >> advanced concepts like OOP, pointers, abstract types, etc before >> loops are covered. That is, he writes about advanced data >> structures before covering more basic control structures. This made >> it very hard for me to follow. > >I would say that the way Barnes' book is structured points out a very >important aspect of Ada; Types are important! > >When you write a program in Ada, you should start out by considering >which data you want to handle, and then declare the appropriate data >types for handling these data. Once you have declared the types, you >can start writing algorithms which handle the data. > >It might be to push things a bit too far, but I think it would be >beneficial, if the types Float and Integer were removed from the >language. > >> So I am going onto the Norman Cohen book. This is much better >> organized for a newcomer. > >Personally I learned Ada (95) from the Language Reference Manual. > >Greetings, > >Jacob >-- >"It is a syntax error to write FORTRAN while not wearing a blue tie."