×
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.
On Thu, Jan 29, 2009 at 9:12 AM, Vern Hamberg <vhamberg@xxxxxxxxxxx> wrote:
David
In our own applications there is almost no reason to use VALUE that I
can think of.
const parameters can introduce subtle bugs in your code when the caller
passes the same variable to two or more parameters of the procedure.
Changes in the called procedure made to a pass by reference parameter
will be implicity applied to the other pass by reference parameters in the
procedure ( const or not const ) which were passed the same variable on
the procedure call.
I recall Hans Boldt referring to this as "aliasing" I pass by value instead
of const reference as often as possible.
-Steve
d custNbr s 10 a
/free
// copy the custmast record keyed by '123' to an entirely new custmast
record.
// return the key of the new custmast record in arg1 of the CopyCust
procedure.
custNbr = '123' ;
CopyCust( custNbr: custNbr ) ;
/end-free
** ---------------------------- CopyCust ----------------------------
** create a new customer record, like another, but with its own CustNbr.
p CopyCust b
d CopyCust pi
d OutCustNbr 10 a
d InCustNbr 10 a const
d cust ds likeds(refCustMast)
d newCust ds likeds(refCustMast)
/free
OutCustNbr = CustMaster_AssignNextCustNbr( ) ;
CustMaster_Chain( cust: InCustNbr ) ;
newCust = cust ;
newCust.CustNbr = OutCustNbr ;
CustMaster_Write( newCust ) ;
/end-free
p e
As an Amazon Associate we earn from qualifying purchases.