-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
bugSomething isn't workingSomething isn't workingconfirmedthe issue has been verifiedthe issue has been verified
Description
Describe the bug
When passing a 'KeyCodeConstants' variable to an API which expects a 'Long' the error is "Cannot coerce" is produced.
To Reproduce
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Public Function KeyToggled(ByVal KeyCode As KeyCodeConstants) As Boolean
KeyToggled = CBool(LoByte(GetKeyState(KeyCode)) = 1)
End Function
Expected behavior
That the variable can be coerced to 'Long', like in VBx.
Desktop (please complete the following information):
- OS: [e.g. Windows 10]
- twinBASIC compiler version [e.g. 0.10.933]
Additional context
n/a
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfirmedthe issue has been verifiedthe issue has been verified
