Re: C version of ADDLC on very long variables
"Elvis Budimlic" <ebudimlic-Ebbh53c6wcYkzXN11fiE55igCaZBIYHkAL8bYrjMMd8@public.gmane.org>
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <01ec01c6e898$76d98e00$6e01a8c0@VMHXP> |
What data type is S? -----Original Message----- Subject: Re: [MI400] C version of ADDLC on very long variables >From the manual: "The unsigned binary value of the addend 1 operand is added to the unsigned binary value of the addend 2 operand and the result is placed in the sum operand." "The addition operation is performed according to the rules of algebra. The result value is then placed (left-adjusted) in the receiver operand with truncating or padding taking place on the right. The pad value used in this instruction is a byte value of hex 00. " Example: DCL DD A CHAR(68); DCL DD B CHAR(68); ADDLC(S) A, B; A pratical use is hashing out a little checksum over some arbitrarily long data. _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.