|
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 **********************************************************************
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.