Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty is treated as object nothing #943

Closed
FullValueRider opened this issue Jun 26, 2022 · 2 comments
Closed

Empty is treated as object nothing #943

FullValueRider opened this issue Jun 26, 2022 · 2 comments
Labels
bug Something isn't working confirmed the issue has been verified

Comments

@FullValueRider
Copy link

Describe the bug
I'm unsure if this is a bug or deliberate twinBasic policy.

The following code Prints 'Its Nothing" in twin basic but in VBA raises an error at the if statement, the error being an object is required.

Public Sub TestNothing()

    Dim myObj As Variant
    
    myObj = Empty

    If myObj Is Nothing Then
    
        Debug.Print "Its nothing"

    Else
        
        Debug.Print "Its something"

    End If

End Sub

To Reproduce
Run the presented code

Expected behavior
Its not a problem but it would be helpful to known which of the two behaviours to expect as standard in twinBasic.

Desktop (please complete the following information):

  • OS: Windows 11
  • twinBASIC compiler version Beta Ide 62
@WaynePhillipsEA
Copy link
Collaborator

Most definitely a bug, thanks for reporting.

@WaynePhillipsEA WaynePhillipsEA added bug Something isn't working confirmed the issue has been verified and removed bug Something isn't working labels Jun 26, 2022
@WaynePhillipsEA
Copy link
Collaborator

Fixed in BETA 63. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed the issue has been verified
Projects
None yet
Development

No branches or pull requests

2 participants