Thank you mike very much for the help, i forgot BYVAL/BYREF completely as if they does not exist due to the lack of usage, yes adding BYVAL to PB solve the problem and display Mandel3D correctly:
calcleng( BYVAL x AS SINGLE, BYVAL y AS SINGLE, BYVAL z AS SINGLE) AS SINGLE
it seems we don't need to declare calcleng previously. as it works with and without "DECLARE FUNCTION calcleng" .
i never used BYVAL/BYREF in thinbasic so i have tested thinbasic now
and only BYREF change the x variable:
Uses "Console"
Local x, y As Long
x = 2
y = test(x)
PrintL "x= " + x
PrintL "y= " + y
PrintL:PrintL "press any key to exit"
WaitKey
'Function test(ByRef x As Long) As Long
'Function test(ByVal x As Long) As Long
Function test(x As Long) As Long
Local y
x = x + 5
y = x
Function = y
End Function
thanks and best regards
Bookmarks