|
Hi Ken, The V4R4 RPG ILE manual says: --- If you are aligning fields manually, make sure that they are aligned on the same boundaries. A start-position is on an n-byte boundary if ((position - 1)mod n) = 0. (The value of "x mod y" is the remainder after dividing x by y in integer arithmetic. It is the same as the MVR value after X DIV Y.) [diagram omitted] Note the following about the above byte sequence: Position 1 is on a 16-byte boundary, since ((1-1) mod 16) = 0. Position 13 is on a 4-byte boundary, since ((13-1) mod 4) = 0. Position 7 is not on a 4-byte boundary, since ((7-1) mod 4) = 2. --- The position they're talking about is the position of the subfield within a data structure, so if the above is true, one would have to assume that the data structure begins on a 16-byte boundary. It would be nice if they explicitly said that, and assured us it won't change from release to release. Regards, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax From: "Sims, Ken" <KSIMS@SOUTHERNWINE.com> > The ALIGN keyword insures that float, signed, and unsigned integers are > aligned on the appropriate boundaries (2-byte, 4-byte, and 8-byte) for the > best performance. This is not going to insure that a 16-byte CHARACTER > field being used for a pointer is aligned on a 16-byte boundary. > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.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.