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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,912597791e813f68 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-04 04:17:44 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: gautier_niouzes@hotmail.com (Gautier) Newsgroups: comp.lang.ada Subject: Re: advantages or disadvantages of ADA over pascal or modula Date: 4 Jan 2003 04:17:44 -0800 Organization: http://groups.google.com/ Message-ID: <17cd177c.0301040417.4c84e1a8@posting.google.com> References: NNTP-Posting-Host: 80.218.88.60 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1041682664 11371 127.0.0.1 (4 Jan 2003 12:17:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Jan 2003 12:17:44 GMT Xref: archiver1.google.com comp.lang.ada:32524 Date: 2003-01-04T12:17:44+00:00 List-Id: "karl bowl": > I would like to ask anybody to tell me about advantages or disadvantages of > ADA(95) over pascal or modula(2). A few advantages of Ada over Pascal that are not mentioned by Steve - Ada has a standard library (I/O, maths,...) - The result of an Ada function can be simply returned where you want; in Pascal you must set a pseudo-variable with the same name as the function and make your way to the end of the function when you have the result (eventually with Goto's!) - it's less readable and sub-efficient. - each composed statement can have more than one statement in it: Pascal: if cond then begin st1; st2 end else begin st3; st4 end Ada: if cond then st1; st2; else st3; st4; end if; It is easier, clearer and removes Pascal's ambiguity of an "else" for two "if"s. A few disadvantages of Ada compared to Pascal (rather more typing work): - Dispose must be instanciated from Ada.Unchecked_Deallocation - some basic functions must be imported from packages: * the Ada.Text_IO stuff * the Ada.Numerics.Elementary_functions stuff (e.g.: x*y, Abs(x), x**2 don't need it, but Sqrt(x) does!) Generally, you see that Ada has been designed with the cure of Pascal's weaknesses... Some discussion on the page below: __________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/pascada.htm NB: For a direct answer, e-mail address on the Web site!