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

DoEvents treated as label when placed before : #1810

Closed
fafalone opened this issue Mar 16, 2024 · 3 comments
Closed

DoEvents treated as label when placed before : #1810

fafalone opened this issue Mar 16, 2024 · 3 comments

Comments

@fafalone
Copy link
Collaborator

Describe the bug
DoEvents treated as label when placed before :

To Reproduce
Use DoEvents in combination with another statement, e.g.

        Dim i As Long
        DoEvents: i = 1

Expected behavior
Treated as sub.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • twinBASIC compiler version 0.15.472

Additional context
I'm not sure if this is only applying to syntax highlighting or compiling; it's very difficult to detect if DoEvents fired properly.

@WaynePhillipsEA
Copy link
Collaborator

Yes, this appears to be a hard coded exception in VB6, since this would ordinarily be treated as a line label. e.g. the same does not occur for other builtin no-param functions like Beep and Command, which are treated as line labels.

@wqweto
Copy link

wqweto commented Mar 25, 2024

You can workaround with Call Beep: i = 2 and Call Command: i = 3 but you cannot use Call DoEvents which is a syntax error. Apparently DoEvents is some kind of intrinsic.

@WaynePhillipsEA
Copy link
Collaborator

Fixed in BETA 478, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants