This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Starting from thinBasic version 1.3.0.1 it is possible to indicate default value for function parameters passed BYVAL.
So far it is possible to indicate default value only for numeric parameters passed BYVAL. More options will come.
An example can explain it:
USES "console"
'---Define a function with 2 mandatory BYVAL params having default values
' 3rd param is optional again with default value
' 4th param is again optional but no default value so its value in function will be 0 if not passed
Function MyFunction(p1 As Long = 100, p2 As Long = 200, Optional p3 As Long = -1, p4 As QUAD)
console_writeline p1, p2, p3, p4
End Function
console_writeline "--- many possible ways to call functions are now available"
MyFunction(,)
MyFunction(,,)
MyFunction(,,2000)
MyFunction(,123,2000)
MyFunction(765,,2000)
MyFunction(765,,-150, 45)
console_waitkey