On Tue, 18 Dec 2007 09:29:14 -0500, Hardee, Charles H wrote: >Consider this: > > ... > COMPUTE OUTPUT-VALUE = OUTPUT-VALUE * 16 + WORK-VALUE > ... > Much better.
>-----Original Message----- >From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On >Behalf Of Bill Klein > >To do this manually, > If you have "B1234" (each character taking 1 byte) then the "manual" >conversion would be > (4 * (16 ** 0)) + > (3 * (16 ** 1)) + > (2 * (16 ** 2)) + > (1 * (16 ** 3)) + > (11 * (16 ** 4) > Ouch! I hate to see novices do this instead of: 4 + 16 * ( 3 + 16 * ( 2 + 16 * ( 1 + 16 * 11 ) ) ) I once spotted this when I investigated why EXP and LN were appearing in a link edit map. ... but I suppose if your optimizing compiler does operator strength reduction well, it doesn't matter. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

