|
Because the pointer is passed differently when CONST is used verses VALUE. When VALUE is specified, a copy of the pointer data is made into a work field and logically, that work field is passed "by value". Meaning it simulates the C "by value" parameter attribute. When CONST is specified, the address of the field containing a pointer is passed. Technically these are different to the call interface. VALUE does NOT equal CONST. -Bob Cozzi www.i5PodCast.com Ask your manager to watch i5 TV -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Monday, March 12, 2007 1:47 PM To: RPG programming on the AS400 / iSeries Subject: Ropen - C2M3015 Just curious why I get C2M3015 error if I use const keyword on the first two parameters: I get C2M3015 when executing _Ropen using prototype below: D Ropen pr * ExtProc('_Ropen') D piFileName * options(*string) const D piMode * options(*string) const D piOptParm * Value Options(*String: *NoPass) ECDDTLp = Ropen('ECDDTL' :'rr'); _Ropen execute without error when using prototype below: D Ropen pr * ExtProc('_Ropen') D piFileName * options(*string) value D piMode * options(*string) value D piOptParm * Value Options(*String: *NoPass) ECDDTLp = Ropen('ECDDTL' :'rr');
As an Amazon Associate we earn from qualifying purchases.
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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.