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.1 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,CP1252 X-Google-Thread: 103376,5212284fdbcb2b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 19:35:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: New to ada, a few questions Date: Mon, 5 Aug 2002 21:31:57 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1028601303 57276 137.194.161.2 (6 Aug 2002 02:35:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 6 Aug 2002 02:35:03 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.12 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:27738 Date: 2002-08-05T21:31:57-05:00 ----- Original Message ----- From: "Keith Thompson" Newsgroups: comp.lang.ada To: Sent: August 05, 2002 6:56 PM Subject: Re: New to ada, a few questions > Stephane Jolicoeur writes: > > *** post for FREE via your newsreader at post.newsfeed.com *** > > > > Hello, > > I am a strong python programmer that is looking for a compiled language to > > complement my tool chest. I tried C but those pointers are an annoyance, I > > tried C++ but there to the pointers and it's OO weirdness kicked in. Then I > > stumbled on an Ada tutorial, I dislike the Pascal-like coding style but > > there seems to be no pointer and it can be compiled to native byte code ! > > I would like to know, what good books are there for learning ada ( some > > sort of tutorial/reference book). How "fast" is compiled Ada code by this I > > mean is it like C/C++ or more like Java? I read that it is possible to > > interface Ada with C? How is this done? Can I use say stdio.h in an Ada > > program? How about interfacing with C++ or objective C? Are there any GUI > > librairies (windows, BSD, Mac OS X)? Has any Ada compiler been made to > > compile code for microcontrollers ( PIC, 68hc11, etc )? How does the > > threading work? I think this should suffice for a first post. > > Ada does have pointers; it calls them access types. They're not > needed nearly as often as they are in C. For example, if you want to > pass a parameter by reference, you just pass it; there's no need to > use a pointer type. Array types are array types. The bounds of an > array are fixed when the object is created, but they can be determined > at run time; again, there's no need to use pointers. Even when you do > use pointers, it's much easier to do so safely. Pointer arithmetic, a > major source of undefined behavior in C, is not built into the > language, If pointer arithic is not built into the language, how do you explain paragraph B.3.2 (1) which says: 1 The generic package Interfaces.C.Pointers allows the Ada programmer to perform C-style operations on pointers. It includes an access type Pointer, Value functions that dereference a Pointer and deliver the designated array, several pointer arithmetic operations, and �copy� procedures that copy the contents of a source pointer into the array designated by a destination pointer. As in C, it treats an object Ptr of type Pointer as a pointer to the first element of an array, so that for example, adding 1 to Ptr yields a pointer to the second element of the array. > and is almost never necessary. Of course you can > shoot yourself in the foot, but it's harder to do so; the safety is on > by default and you have to say "I want to turn off the safety now, and > I know it's dangerous." before you disable it. > > No, you can't use directly (Ada doesn't grok C syntax), but > Ada does have good facilities for interfacing to other languages, with > predefined support for C, Fortran, and Cobol, and compiler-specific > support for C++. Of course, Ada has its own I/O packages, so there's > seldom any need to interface to the facilities defined in . > > -- > Keith Thompson (The_Other_Keith) kst@cts.com > San Diego Supercomputer Center <*> > Schroedinger does Shakespeare: "To be *and* not to be" > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada > >