|
I am not sure I understand what you mean. Anyway, you must have seen by now the post by Barbara M. which explain the issu much better that I could have done. Denis Robitaille Directeur services techniques Cascades Inc 819 363 5187 fax 819 363 5177 >>> rob@dekko.com 01/11/02 01:31pm >>> But, in this case, if I avoid the data structure, and it's defining the fields with the wrong length, I won't have that problem? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Denis Robitaille" To: <rpg400-l@midrange.com> <DRobitaille@casc cc: ades.com> Fax to: Sent by: Subject: Re: Basing a field on an unreferenced field(s) doesn't work rpg400-l-admin@mi drange.com 01/11/2002 11:53 AM Please respond to rpg400-l You are right, I am a little bit pointer phobic. The overlaqpping DS example that you give does suffer the same problem but when you look at the code, the error is more obvious (i my opinion). And now for the example of non consecutive storage assignement: Let say that in you file, you have the following field defined consecutively: fld1 fld2 fld3 But, in the RPG, you define the following DS: ds otherfld (otherfld is bigger than fld1) fdl1 overlay(otherfld) There is now a gap between fld1 and fld2 There are other situation that can cause this but this is fairly typical. Denis Robitaille Directeur services techniques Cascades Inc 819 363 5187 fax 819 363 5177 >>> rob@dekko.com 01/11/02 11:36am >>> I think you are being pointer phobic. I feel for you - I used to be too. But I've seen the light. Let's say that a Luddite wanted to avoid pointers. But they overlayed a 4 element array over a data structure that was only 3 elements big - as in your example. Wouldn't they still be suffering a problem? So this problem is not really pointer specific. I've heard this before "You are also assuming that consecutive fields in a file are stored in consecutive memory location which is not always the case." But I've seen no examples. Rob Berendt -- " _______________________________________________ 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 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.