Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!jato!randy From: randy@jato.Jpl.Nasa.Gov (Randy Hammock) Newsgroups: comp.sys.amiga Subject: Re: To macro, or not to macro? (LONG) ... a programming style. Message-ID: <1333@jato.Jpl.Nasa.Gov> Date: 12 Jun 89 04:55:44 GMT References: <2454@van-bc.UUCP> <19191@cup.portal.com> <10197@watcgl.waterloo.edu> <19353@cup.portal.com> Reply-To: randy@jato.UUCP (Randy Hammock) Distribution: usa Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 15 It has been my experience that a good set of macros (in any language) has a tendency to make code more readable and easier to understand. A project that I worked on a few years ago had a set of "structuring" macro for our assembler. Can you imagine writing jump-less assembler code. True, the macros instered the jumps for you but you did not have think up all the silly label name every time you had to jump around a couple of lines of code. We had macros that provided: loop-until, loop-while, select-case, doif-andif-elseif. They could even be nested 10 deep! Remeber, if used improperly, macros can also obfuscate code, too. -- /// | randy@jato.jpl.nasa.gov Telos - Jet Propulsion Laboratory - NASA AMIGA/// | hammock@mars.jpl.nasa.gov ** Voyager II at Neptune August 1989 ** \\\/// |-------------------------------------------------------------------- \XX/ | "If I wanted your opinions, I'd have given them to you!" - Mock