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



Bob cozzi wrote:
> 
> Barbara,
> I use this technique and don't seem to have an issue. What should the
> prototype be? Would it make a copy of the address of the parameter value,
> which would be the original variable's address anyway?
> 

Bob, nothing bad would happen as long as you only ever pass a pointer. 
(Either a declared pointer field or %ADDR of something else.)

But OPTIONS(*STRING) allows you to pass character data directly, without
%ADDR.  If you passed a character field expecting it to be used as the
input buffer, then the compiler would copy the field + x'00' to a
temporary, then pass the address of the temporary.  The temporary would
get updated, and the character field would retain its old value.

The inBuffer parameter should just be prototyped as * VALUE, without the
OPTIONS(*STRING).


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.