|
what about a data pointer? The MI func ref says the SETDP ( set data pointer ) instruction is accessible via bound program built in number 388 ( whatever that means ). And MATPTR is built in nbr 89. The way a data pointer works is that the 16 byte pointer contains both the addr and scalar attributes of what it points to. To retrieve the attributes, run the MATPTR instruction. To set the data pointer, use SETDP. Maybe now that IBM has lost interest in ILE as a grand scheme in favor of the JVM ( guessing ), the iSeries people can start adding iSeries only enhancements to ILE. Bringing back the data pointer and the genius who designed it would make the system better. -Steve -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jon Paris Sent: Sunday, August 24, 2003 1:41 PM To: rpg400-l@xxxxxxxxxxxx Subject: RE:"guessing" the parameter type. >> Im really aware that i can't get that info from the pointer itself (a pointer is just a pointer anyway), but i was wondering if using the address of the data could I get the data type somehow. No, you can't. The compiler does not store this information because it does not care. The data type/size information is used by the compiler to determine what code should be generated, it has no value beyond that point. As I and others have pointed out, two completely different pieces of data can have the same address - that address alone could therefore _never_ be enough. That's why operational descriptors were introduced as part of ILE. Unfortunately they were never fully implemented and so we have no mechanism on the system to do what you want, whether we use just the pointer or descriptors. Jon Paris Partner400 www.Partner400.com _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx 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.