|
I get the following compile error when try to assign a pointer to a const variable. Did I do something wrong? RNF7586 20 52 001800 The address of a constant value is used incorrectly. Below is the program: d example pr d piParm1 10a const options(*varsize) /free example('TTTTTTTTTT'); *inlr = *on; /end-free *============================================================== * example *============================================================== p example B d pi d piMyStr 10a const options(*varsize) d myStr s 10a based(myStr_p) /free myStr_p = %addr(piMyStr); /end-free p example E -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Thursday, August 31, 2006 12:03 PM To: RPG programming on the AS400 / iSeries Subject: RE: Allocate field with options(*nopass :*omit)
1) I don't think you can do that on a const variable.
You *can* do it on a CONST variable. I don't think you SHOULD, but you CAN.
As an Amazon Associate we earn from qualifying purchases.
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.