On Sat, Sep 11, 2010 at 05:06:22PM -0400, Mike Caron wrote:
> On 9/11/2010 4:27 PM, James Paige wrote:
>> I keep forgetting about BYREF. I know when to use it on ints, and I know
>> never to use it on strings, and I know it is utterly and completely
>> irrelvant on arrays
>>
>> But what I can't remember is whether it matters for UDTs
>
> You generally want to pass UDTs BYREF, especially if you want to modify  
> the UDT in the sub. You can pass them BYVAL, but:
>
> 1. They will be read only (it passes a copy)
> 2. If the UDT is big and passed around frequently, it will be  
> considerably slower than passing BYREF.

But doesn't -lang deprecated pass them BYREF by default or something?

That would explain why all the many times I have forgotten to specify 
BYREF on UDTs has not broken anything (that I have noticed yet).

---
James
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to