× 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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.