|  | Posted by Jerry Stuckle on 06/23/68 11:59 
Ney André de Mello Zunino wrote:> Jerry Stuckle wrote:
 >
 >> Passing by reference should never increase the amount of overhead (at
 >> least not by any measurable amount), even for an integer.  And for
 >> more complex objects it will decrease the overhead.
 >
 >
 > Thanks for your reply. Given that the use of references can never hurt
 > and that this is my first time using them, could you tell me if I am
 > doing it right (according to the sample code in my original post)?
 >
 > Thank you,
 >
 
 Yep.  That's how you return a reference.  The only comment which is
 actually only a matter of style is the generally used syntax is:
 
 function &getPosts(...)
 
 That is, the '&' goes just before the function name instead of
 immediately after the 'function' keyword.  However, it's a matter of
 style, and either should work.
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
 [Back to original message] |