|
You've got it. When you pass an expression, the compiler generates a temp var which is then passed by reference to the procedure. In some cases, the compiler will also "cast" the value you pass to a procedure. When it does, a data is copyed/mapped into a temp variable that is the same size and shape of the parameter. Very useful for passing in date values and numbers. -Bob Cozzi www.RPGxTools.com If everything is under control, you are going too slow. - Mario Andretti -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson Sent: Wednesday, July 27, 2005 1:11 PM To: RPG programming on the AS400 / iSeries Subject: Procedure Parameter Passing - Processing Implications of Const When I define a procedure parameter as Const: 1. The caller passes a pointer to the procedure, which the procedure then interprets. 2. If I pass an array 32555A Dim(9000), it's no different than if I pass a 3i 0 field (processing-wise)? I question this because if I can pass an expression, there is no pointer to that expression... so what is it doing? Thanks, Kurt Anderson Application Developer Highsmith Inc. W5527 State Road 106, P.O. Box 800 Fort Atkinson, WI 53538-0800 TEL (920) 563-9571 FAX (920) 563-7395 EMAIL kjanderson@xxxxxxxxxxxxx
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.