Path: utzoo!attcan!uunet!lll-winken!xanth!mcnc!decvax!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: beauty of TMLPascal 1.0.3 Message-ID: <14298@dartvax.Dartmouth.EDU> Date: 8 Jul 89 04:16:01 GMT References: <2205@orion.cf.uci.edu> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 46 In article <2205@orion.cf.uci.edu> ggiergiel@vmsa.cf.uci.edu writes: > >Version 1.0.3 of TMLPascal running under MPW 2.0.2 >generates incorrect code for the following source: > >Type >complex = structure > r:extended; > i:extended; >end; ... >Procedure CMult(Var z:complex; Var y:complex; Var x:complex); >Begin >z.r:=x.r*x.r - y.i*y.i; >z.i:=x.r*y.i + x.i*y.r; >end; > >The correct code will be generated if calculation of z.r and >z.i is split into two lines (multiply first and add later). >Obviously I gave up on using TMLPascal. At a minimum one would want >to see compilers to be able to add and multiply numbers correctly. >JGiergiel GGIERGIEL@UCIVMSA. TML Pascal II v 3.0.2 generates proper code for the example, except I had to use "record" instead of "structure." It also comes with MPW 3.0, which is superior to MPW 2.0.2. I bought my copy new for the paltry sum of $115, and you should be able to upgrade your copy for less than that. My advice is to buy the upgrade and give TMLPascal another chance. It is not uncommon for compilers to generate incorrect code. In fact, it is a fairly common thing for them to do. I must admit, however, that I too was disillusioned the first time I saw it happen, and that was NOT on a Macintosh. Send, abort, edit, or list? send Article not accepted by server; not posted. inews: Article rejected: news included more text than new text Article appended to /people1/earleh/dead.article A copy may be temporarily found in /people1/earleh/.article Do you have to put up with this nonsense where you work? Earle R. Horton "People forget how fast you did a job, but they remember how well you did it." Salada Tag Lines