|
On 2012/6/15 5:25 PM, Anderson, Kurt wrote:
What exactly scenario can you change the contents of a parameter thatIf you pass a subfield as CONST, and also pass its data structure by
uses Const? If there's a scenario, open a PMR.
reference, then modifying the subfield of the data structure parameter
would cause the CONST parameter to also get modified.
Another way to legally modify the value of a CONST parameter is for the
procedure to modify the global variable that was passed as the parameter.
As Jon said, passing a parameter by value is the only way to guarantee
the parameter can't get changed by modifying something that shares the
same storage as a const parameter. But that wouldn't help Robert, since
Robert wanted to prevent the subfield being modified at all.
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.