× 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 don't know. I tried a C array of 5 chars, set value to "TWO ", and it was
NULL in the 5th position. Also without the NULL, in a char[4]. Neither
worked. Putting the array inside a struct, whether null-terminated or not,
works.

This is IBM's explanation, that  I posted earlier. All this special
handling is odd, IMO. You need to use the %BIN to get binary data into
appropriate *CHAR variables, and you need to use a struct to return char[]
or char*. Strange!!

At 05:46 PM 4/3/02 +0200, you wrote:
>Could it belong from null termination ?
>Sincerely
>Domenico Finucci
>Fiditalia , Milano, 02- 4301-2494
>
>
>-----Messaggio originale-----
>Da: Vernon Hamberg [mailto:vhamberg@attbi.com]
>Inviato: mercoledì 3 aprile 2002 17.28
>A: midrange-l@midrange.com
>Oggetto: Re: CALLPRC with RTNVAL
>
>
>That might be because of the 16-byte pointer thing. And everything in CL is
>by reference, i.e., by pointer.
>
>But that doesn't seem to explain why a CL program can't handle a character
>array from C. I mean, when you've declared
>
>char rtnval[4]
>   and use
>
>return(rtnval)
>
>it's returning the pointer to the start of that array, which is actually a
>pointer, after all. And when the article says to use a struct (which DOES
>work), you don't declare a pointer to a struct, you declare a struct. So
>there must be some special understanding between iSeries CL and C/C++
>programs.
>_______________________________________________
>This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
>To post a message email: MIDRANGE-L@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
>or email: MIDRANGE-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/midrange-l.



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.