On Tue, 31 Jan 2006, Dan wrote:
The RPG ref on an *ENTRY PARM says "Fields or data structures defined with
the keywords BASED, IMPORT, or EXPORT" are not allowed.

Passing a BASED parameter wouldn't make any sense.  Parameters are passed 
by reference (i.e. by passing the pointer to that parameter).  If you 
allowed it to be BASED and defined a pointer that it was based on, then 
it'd have two different pointers that it's based on, which doesn't make 
any sense.
Instead, you need to pass the pointer (rather than the array itself) to 
the subprocedure. The subproc can then allocate memory to it.  The pointer 
does have to be passed by reference, since %ALLOC() will need to set the 
address in that pointer.
I strongly recommend that you avoid the dynamic memory allocation approach 
to this if you can possibly avoid it. It's not worth it for a measley 40k 
of data.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.