Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!uokmax!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!lance!ptcburp!michi From: michi@ptcburp.ptcbu.oz.au (Michael Henning) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? (was Re: Funny mistake) Message-ID: <373@ptcburp.ptcbu.oz.au> Date: 28 Mar 91 06:14:51 GMT References: <1991Mar18.195351.11985@unlv.edu> <357@ptcburp.ptcbu.oz.au> <1991Mar19.192416.13756@unlv.edu> <1991Mar28.004147.705@worf.harvard.edu> Organization: Pyramid Technology Corporation Lines: 47 dmm@cfa.harvard.edu (David Meleedy) writes: >is perfectly reasonable... in fact here is an example of some pascal type >code in c: >#include >#define REAL float >#define BEGIN { >#define WHILE while( [ More stuff deleted ] >#define PROGRAM main() >PROGRAM >BEGIN > REAL a,b,c,root1,root2,discriminant; > a GETS 1 ; > WHILE NOT ( a EQUALS 0 ) DO > BEGIN > WRITELN(" Quadratic Equation Solver. What are a,b, and c? "); > WRITELN(" Enter 0 alone to exit program."); > READ( a ); [ More stuff deleted ] >admittedly it's not perfect pascal, but it is certainly readable and >understandable. Most places I've worked for, writing code like that would have cost me my job. Are you really serious about this ? Are you really suggesting that this is an improvement over writing the same thing without macros ? Why don't you write it in Pascal in the first place if you want it to look like it ? Michi. -- -m------- Michael Henning +61 75 950255 ---mmm----- Pyramid Technology +61 75 522475 FAX -----mmmmm--- Research Park, Bond University michi@ptcburp.ptcbu.oz.au -------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA uunet!munnari!ptcburp.oz!michi