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



Tom Liotta wrote:
Barbara:

Can you clarify one thing? What do you mean by "which would not work" when you speak about a pointer for a varying length field? Is that to mean such an address cannot be passed? or that the called procedure could not correctly return a value without messing things up in the calling procedure? Would that still be strictly true even if both caller and callee used an agreed length, e.g., the caller set the length appropriately before the call? I've never looked at what would happen for a varying length field in this case; this makes me curious.

Thanks.

Basically, if you pass a pointer as a parameter, both caller and
callee *must* agree on what the pointer points to, in terms of data
type, format, length, decimal positions, CCSID, etc. If the API
expects a pointer to a fixed length character string, passing the
address of a varying length character variable won't work, since the
address would point to the 2-byte length prefix.

Cheers!  Hans





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.