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



Based on that info, CONST is enforced by the compiler ONLY if you are using sub-procedures.
If you are using an external service program or just another program, then using VALUE is the only way to ensure that the parameter will not be changed on return from the call.

Is this a correct summary?

Thanks,

Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3
  
 






________________________________
From: sjl <sjl_abc@xxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Sent: Wednesday, January 28, 2009 1:09:18 PM
Subject: Re: CONST and VALUE revisited

David wrote:
I thought I would read in the data area in my main procedure
and then directly call a subprocedure with CONST on the parameter
to protect my data area.
However, from experience I've noticed that it is still possible to modify
the parameter inadvertently, and we have already discussed this.
Someone said that CONST in reality only means that the parameter
is not INTENDED to be changed.

So, I just thought it was a bit ironic : normally, I use CONST on all
parameters
used for input. But now that I REALLY don't want my parameter to be
changed,
I shall code VALUE instead.


David -

I have this page bookmarked:
http://www.web400.com/download/ilerpg/subprocedure_parameters2.htm

- sjl






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