× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I tend to agree.

Myself, I've used pointers just a few times, and the main thing I use them
for is for trigger programs to correctly get the before and after image of
the buffers without hardcoding a fixed offset.  Before pointers this was
very hard to do and these programs would have a tendancy to stop working
when IBM changed the layout of the return fields.

The other things I've used pointers for I believe always had to do with the
API calls or some very low level reading of objects (one program to read
NETF information directly in RPG).

I do think, however, that if I start to implement programs in RPG using
TCP/IP that I will be using pointers for that also to transverse the data
buffer, although I've yet to find a real need to write a production RPG
TCP/IP program.

Personally, I find RPG pointer use easier to use than C pointer use and less
prone to mysterious errors.  The Based mechanism makes sense once I
understood it and helps reduce the number of times I'm pointing a pointer to
a pointer instead of the data or such.

I hate linked lists myself, and although I'm sure they have their place,
I've always found some other mechanism to do what I wanted without having to
resort to them.

Regards,

Jim Langston

-----Original Message-----
From: Bob Cozzi (RPGIV) [mailto:cozzi@rpgiv.com]

If we didn't have pointers in RPG IV, it would be so difficult to call
the various C runtime library functions that we've been exploiting.

I agree that if people fall into a groove of using pointers for things
like link lists, that is going too far, and an array, or multiple
occurrence data structure might be safer.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.