|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] I think we would have seen a better sample on the /+ /- If you had not defined those fields with zero decimal places :-) Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Ray, Adam" <ARay@wipfli.com> Sent by: rpg400-l-admin@midrange.com 08/02/2002 03:33 PM Please respond to rpg400-l To: <rpg400-l@midrange.com> cc: Fax to: Subject: RE: Error in the EVAL Statement? (when + is used more than once) I did the following: D amount1 S 25S 0 inz(2) D amount2 S 25S 0 C EVAL amount2 = amount1 ++ 10 C EVAL amount2 = amount1 +- 10 C*** EVAL amount2 = amount1 +* 10 C*** EVAL amount2 = amount1 +/ 10 C EVAL amount2 = amount1 -+ 10 C EVAL amount2 = amount1 -- 10 C*** EVAL amount2 = amount1 -* 10 C*** EVAL amount2 = amount1 -/ 10 C EVAL amount2 = amount1 *+ 10 C EVAL amount2 = amount1 *- 10 C EVAL amount2 = amount1 ** 10 C*** EVAL amount2 = amount1 */ 10 C EVAL amount2 = amount1 /+ 10 C EVAL amount2 = amount1 /- 10 C*** EVAL amount2 = amount1 /* 10 C*** EVAL amount2 = amount1 // 10 The results were as follows (commented out lines were invalid). 12 -8 -8 12 20 -20 1024 0 0 > -----Original Message----- > From: Peter_Vidal@pall.com [SMTP:Peter_Vidal@pall.com] > Sent: Friday, August 02, 2002 03:12 PM > To: rpg400-l@midrange.com > Subject: RE: Error in the EVAL Statement? (when + is used more than once) > > > "I think it's taking the second + as a sign." > > That may be the reason Jim. I also tried the * and it is a error. I think this > clarifies my doubt on this matter. > However, I tried this now: > > c z-add 502.34 amount1 7 2 > c z-add 0 amount2 7 2 > > c eval amount2 = amount1 + + 7 > c 500.00 > > c seton > > You know the result? 8002.34 > > How? > Peter Vidal > PALL Aeropower Corp. > Senior Programmer Analyst > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.