|
I'm ok with pointers and procedures, but I'm not so sure about this fire thing. > -----Original Message----- > From: Scott Klement [mailto:klemscot@klements.com] > Sent: Monday, April 16, 2001 3:06 PM > To: RPG400-L@midrange.com > Subject: Re: Variable length MODS > > > > > > What you said sounds right to me. If you simply want to use > pointers, forget > > the DIM or OCCURS and just user pointer arithmetic and be > sure you don't > > lose track of what you're trying to access vs what you > allocated memory for. > > I agree with this as well. If you don't want the 9999 limit, > don't use > a MODS. Just use a based data structure and pointer arithmetic. > This is so easy to do on the V4Rx versions that you might as well! > > (I used to do this on V3R2, using user spaces and a home-written > "offsetptr" routine because I didn't have the ALLOC op-code or the > ability to do direct pointer math, but needed a larger MODS) > > The use of the OCCUR op-code is awkward to say the least. Why bother > with it? > > > > My only suggestion would be to comment thoroughly enough > for the next > > programmer who may not be up on pointers and could go off > into left field. > > That's true. A lot of RPG programmers will go and run and hide under > the bed when they hear the word "pointer". It's too bad... But if > we keep trying, eventually we'll get them to accept things > like pointers, > procedures, and the discovery of fire... > +--- | 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-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.