I have no objection. In fact that is how I'm doing it. I was just
thinking about generalizing code and thought if there was a way to get the
structure size from the pointer i'd have something really nifty. But
since I can't, I don't have anything more nifty that what already exists.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/19/2010 02:22 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Trying to get the size of a Datastructure through the pointer?
Possible? Not having good luck with it...






Hi Bryce,

My question, is it possible to get the size of MasterList_T from its
basing pointer? Is there a bif or something that will let me get
it?

RPG does not have "typed pointers". A pointer in RPG does not imply a
particular data type/structure layout. It simply points to a byte in
the system. And a byte is always 1 byte long! :)

The correct way to find out the size of the pointer is by doing
%size(MasterList_t), in other words, asking for the size of the thing
the pointer is based on. What is your objection to that technique?

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.