I wouldn't start about pointers but i would like to see the BYREF example.
Also applies to the PureBasic helpfile imo, it's hard to remember how byref worked again.
This issue was discussed here once:
viewtopic.php?t=9027
However the solution to pass the pointer makes it actually harder, compare this:
Code: Select all
; same for long
Procedure SetLong(*p.LONG)
*p\l = 15
EndProcedure
SetLong(@i)
Debug i
Code: Select all
Sub SetLong( p As Long )
p = 15
End Sub
Dim p As Long
SetLong p