|
Hey I was looking to see if they were here and saw this Figure 146. Summary of Arithmetic Operations *..1....+....2....+....3....+....4....+....5....+....6....+....7...+.... C* C* In the following example, the initial field values are: C* D A s 3p 0 inz(1) D B s 3p 1 inz(10.0) D C s 2p 0 inz(32) D D s 2p 0 inz(-10) D E s 3p 0 inz(6) D F s 3p 0 inz(10) D G s 3p 2 inz(2.77) D H s 3p 0 inz(70) D J s 3p 1 inz(0.6) D K s 2p 0 inz(25) D L s 2p 1 dim(3) D V s 5p 2 D W s 5p 1 D X s 8p 4 D Y s 6p 2 D Z s 5p 3 /FREE L(1) = 1.0; L(2) = 1.7; L(3) = -1.1; A = A + 1; // A = 002 V = B + C; // V = 042.00 V = B + D; // V = -010.00 V = C; // V = 032.00 E = E - 1; // E = 005 W = C - B; // W = 0022.0 W = C - D; // W = 0052.0 W = - C; // W = -0032.0 F = F * E; // F = 060 X = B * G; // X = 0027.7000 X = B * D; // X = -0200.0000 H = H / B; // H = 007 Y = C / J; // Y = 0053.33 eval(r) Z = %sqrt(K); // Z = 05.000 Z = %xfoot(L); // Z = 01.600 dump(a); *inlr = *on; /END-FREE Look at the result of this X = B * D; // X = -0200.0000 ****should it not be -0100.0000 and this W = C - D; // W = 0052.0 *** should it not be 0042.0 And on that note, Hans could you fill in the examples given with actual values and show results. Thanks Bill Hopkins Hans Boldt <boldt@xxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 11/25/2003 12:05 PM Please respond to RPG programming on the AS400 / iSeries To: rpg400-l@xxxxxxxxxxxx cc: Subject: Re: Shorthand Syntax (was XFoot with Qualified DS's) RJoubert@xxxxxxxxxxxxxxxxxxxx wrote: > Greetings to the list. > > Has someone created or compiled a list of all the new shorthand syntax's > yet? > > If so, can we get to it somehow? > > Thanks > a += b; a -= b; a *= b; a /= b; a **= b; Done! Cheers! Hans _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx 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-2025 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.