ReneMiner
18-05-2013, 18:18
What is wrong in my Functions-Name/Parameters ?
I tried with "optional" before all lines - same result - missing close parens:
Uses "CONSOLE"
' I just left those constants inside...
Begin Const
%NODE_PREVIOUS = -3
%NODE_NEXT
%NODE_UBOUND
%NODE_NONE
%NODE_FIRST
%NODE_Parent
%NODE_Sibling
'%NODE_Child
'[] flags
%NODE_DELETED = &H00000000
%NODE_COLLAPSED = &H00000001
%NODE_EXPANDED = &H00000002
End Const
$NODE_DELETED = MKL$(%NODE_DELETED)
WaitKey
Function NODE_Add( Optional sUser As String = "", _
lUser As Long = 0, _
Relative As Long = %NODE_NONE, _
Relation As Long = %NODE_PARENT, _
Flags As Long = %NODE_COLLAPSED, _
Position As Long = %NODE_UBOUND _
) As Long
End Function
for sUser and lUser I don't need default-values but why doesn't this accept the constants as defaults? I use constant values as %MB_OK in some Gadget-Sub, there it works.
I tried with "optional" before all lines - same result - missing close parens:
Uses "CONSOLE"
' I just left those constants inside...
Begin Const
%NODE_PREVIOUS = -3
%NODE_NEXT
%NODE_UBOUND
%NODE_NONE
%NODE_FIRST
%NODE_Parent
%NODE_Sibling
'%NODE_Child
'[] flags
%NODE_DELETED = &H00000000
%NODE_COLLAPSED = &H00000001
%NODE_EXPANDED = &H00000002
End Const
$NODE_DELETED = MKL$(%NODE_DELETED)
WaitKey
Function NODE_Add( Optional sUser As String = "", _
lUser As Long = 0, _
Relative As Long = %NODE_NONE, _
Relation As Long = %NODE_PARENT, _
Flags As Long = %NODE_COLLAPSED, _
Position As Long = %NODE_UBOUND _
) As Long
End Function
for sUser and lUser I don't need default-values but why doesn't this accept the constants as defaults? I use constant values as %MB_OK in some Gadget-Sub, there it works.