CONST Doesn’t Mean You Can’t Change It
October 20, 2015 Ted Holt
You can pass parameters to an RPG subprocedure in three ways: by reference, by read-only reference, and by value. (I have written about this before.) My favorite method is read-only reference. I use it as often as I can. Would you believe that it is possible to change the value of a variable that is passed to a subprocedure by read-only reference? Since you would probably do so only inadvertently, it’s good to understand how it can happen. To pass a parameter by read-only reference, include the CONST keyword in the procedure prototype and the procedure interface. D Process pr |