|
Both statements would yeild in the same result. Joel B. Harvell Food Lion, LLC (704) 633-8250 x2709 jbharvell@xxxxxxxxxxxx -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter.Colpaert@xxxxxxxxx Sent: Wednesday, February 01, 2006 9:34 AM To: Midrange Systems Technical Discussion Subject: RE: What do you get when you multiply a number with 1 Wouldn't it be enough to simly code Eval(h) WKSLBS0 = ICNWGT I thought that would take care of the rounding, without the need of multiplying by 1. Peter Colpaert Application Developer PLI - IT - Kontich, Belgium ----- Yoda of Borg are we. Futile is resistance, assimilated will you be. ----- "Harvell, Joel" <jbharvell@xxxxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 01/02/2006 15:17 Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx> cc Subject RE: What do you get when you multiply a number with 1 He is rounding. Eval(H) will cause the result to be rounded to the nearest decimal. If ICNWGT = 125.67894 the statement will result in WKSLBS0 = 126 If ICNWGT = 125.41324 the statement will result in WKSLBS0 = 125 Joel B. Harvell Food Lion, LLC (704) 633-8250 x2709 jbharvell@xxxxxxxxxxxx -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of ganeshkumar.murugesan@xxxxxxxxx Sent: Wednesday, February 01, 2006 6:23 AM To: midrange-l@xxxxxxxxxxxx Subject: What do you get when you multiply a number with 1 Here is a piece of code from my application program. The author of this program is a renowned person, who wouldn't do mad things. IF PMTEN = *BLANKS OR PMTEN = '0' EVALH) WKSLBS0 = ICNWGT * 1 EVAL WRKSLBS = WRKSLBS + WKSLBS0 ENDIF PMTEN = no. of decimal places (I'm really not sure about this. This field is taken from a file) WKLBS0 is a 15, 0 packed field ICNWGT is a 15, 5 packed field (This field is also taken from a file) The question is "why is the author multiplying with 1". What is he trying to accomplish? Thanks, Ganesh Exel GFM CM Team, Wipro Technologies, Chennai PH: +91 044 30691771 MB: +91 09841289431 The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.