|
Carlos,
Thanks for pointing this out. Hans's response primarily addresses the use of global variables. What I am saying is that const can cause problems whenever the calling proc uses the same variable on more than one parm of a proc: Calc_New_Qty( qty1: qty1 ) ;
d Calc_New_Qty pi d OutQty 7p 2 d InQty 7p 2 const /free OutQty = 0 ; // this can affect any other pass by // reference parm. const or no const! ... /end-free
I think passing any numeric or small char variable by const reference is a bug waiting to happen. passing by value is safer and performs just the same.
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.