× 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.



Hmm. After I read the chapter about pointer conversion my understanding is that it should have worked.

The service program is compiled to use teraspace and the ILE RPG program is enabled for teraspace by default. The procedure returned a pointer (8-byte teraspace) and my understanding of the docs are that it should have been converted to 16 byte (and I didn't get any error message here, so far so good). Now why is it giving me an error message when I pass the pointer back to the service program as a parameter? Should it also convert it back to an 8-byte pointer?

<quote>
The compilers automatically insert pointer conversions to match pointer lengths.
</quote>

Does this only work under 7.1? The machine I tried is running 6.1.

Mihael

-----Original Message-----
From: c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx [mailto:c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Friday, June 04, 2010 9:24 PM
To: c400-l@xxxxxxxxxxxx
Subject: Re: [C400-L] pointers in different storage models

On 6/4/2010 5:44 AM, Schmidt, Mihael wrote:
...

Now I have just read that in 7.1 RPG modules can be compile with the
storage model *teraspace. Does that mean that the pointer in RPG will
also be 8 byte and that the calling to the procedure might work with
7.1 because it is the same storage model?


No, even with storage model *teraspace, RPG will still only support 16
byte pointers.

You will have to use 16 byte pointers in the parameter interfaces
between C and RPG. The C modules can use 8 byte pointers internally.

Here is a page from the C/C++ manual about specifying 8 or 16 byte
pointers in prototypes:
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=/rzarf/prag_datamodel.htm

Here is a page from ILE Concepts about pointer conversions:
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=/ilec/sc41560685.htm

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.