Both compilers support passing object variables by reference though this functionality in xHarbour
is limited to pure instance or class variables only and does not work for SETGET methods.
In Harbour it works correctly.
This code illustrates the problem: proc main() local oBrw := tbrowseNew() ? oBrw:autoLite oBrw:autoLite := !oBrw:autoLite ?? "=>", oBrw:autoLite p( @oBrw:autoLite ) ?? "=>", oBrw:autoLite proc p( x ) x := !x Harbour prints: .T.=> .F.=> .T. but xHarbour prints: .T.=> .F.=> .F. without generating any compile or run time errors.
No comments:
Post a Comment