Thanks!
OK, I have to check my code for this... in vb this works different way.
Thought I don't know how exactly. In vb WITH instruction (properly
placed) speeded up code,
and code I used as example worked. Maybe it used tmp like in Gambas,
but it did this also:
Code:
With var
.y = 0
var = funcx(
> Some more testing...
> With this code:
>
> With tmp
> .y = 0
> tmp = funcx()
> With tmp ' Extra with instruction.
> Debug .y
> Debug tmp.y
> End With
> End With
>
> Or with this:
>
> With tmp
> .y = 0
> funcx2(tmp) ' By reference (unfortunately this solution doesn't fit
>
Some more testing...
With this code:
With tmp
.y = 0
tmp = funcx()
With tmp ' Extra with instruction.
Debug .y
Debug tmp.y
End With
End With
Or with this:
With tmp
.y = 0
funcx2(tmp) ' By reference (unfortunately this solution doesn't fit
to my code).
Debug .y
Debu
Hi!
Confirmed on Gambas2 and Gambas3.
Code:
Dim tmp As New Class1
With tmp
.y = 0
tmp = funcx()
Debug .y
Debug tmp.y
End With
Public Function funcx() As Class1
Dim test As New Class1
test.y = 1
Return test
End
Output of debug is;
0
1
I think .y and tmp.y should be same!
Regards,