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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/02/19 Message-ID: <4g966j$cr8@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 140035748 references: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <3114d8fb.5a455349@zesi.ruhr.de> <4f5h5t$f13@vixen.cso.uiuc.edu> <4g1bgf$l5@mailhub.scitec.com.au> <312515DF.7D3B@cmlj.demon.co.uk> <4g5sas$787@goanna.cs.rmit.EDU.AU> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-02-19T00:00:00+00:00 List-Id: rav@goanna.cs.rmit.EDU.AU (++ robin) writes: >---It's other things besides -- like, how to find a square root, how to do >simple I/O. How to do a square root: Step 1 (applies to all programming languages) Look up square root in the manual. Step 2 (applies to all programming languages) Do what the Fine Manual says. In Ada, use the index, which points you to A.5.1, and do with Ada.Numeric_Elementary_Functions; use Ada.Numeric_Elementary_Functions; ... sqrt(X) ... Section G.2.4 even gives you error bounds on the result, which no other language standard I've checked does. Just because of that, I'd rather do a square root in Ada than anything else. Simple I/O: Step 1 Look it up in the manual Step 2 Do what the Fine Manual says. *SIMPLE* I/O involves withing and using a couple of standard packages, and then using Put, New_Line, Get, and Skip_Line. Pretty darned simple. It has not been a problem for first-year students at this university. Ada does not support Fortran-style formatted I/O, nor PL/I style formatted or pictured I/O (but see Interfaces.COBOL). -- Election time; but how to get Labour _out_ without letting Liberal _in_? Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.