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

Error with tweak mode when using underscores in numbers #442

Closed
processing-bot opened this issue Mar 9, 2022 · 3 comments
Closed

Error with tweak mode when using underscores in numbers #442

processing-bot opened this issue Mar 9, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@processing-bot
Copy link
Collaborator

Created by: TFC-343

Description

An error when running tweak mode.

Expected Behavior

I expect code that runs in normal mode, to not raise a syntax error in tweak mode.

Current Behavior

When running tweak mode, under a specific set of circumstances, it can raise an error when running normal does not.
It seems that when using underscore syntax for numbers, 1_000 tweak mode does not probably convert this to a tweak integer.

Steps to Reproduce

I have found this code to consistently throw the error

void setup(){
  size(100, 100);
}

void draw(){
 int x = 1_000;

}

the error raised is Syntax Error - Missing name or ; near ‘ int x = tweakmode_int[0]_000’?
This error does not happen if there is no size() call, other calls or assignments in setup do not raise the error.
The code does not need to assign 1_000, it can try and pass it to a function or output it.
Underscores in other places in the number also raise the error.

Your Environment

  • Processing version: 4.0b7
  • Operating System and OS version: Windows 11 Home, 21H2
@processing-bot
Copy link
Collaborator Author

Created by: arnoudvanderleer

I will take a look at this

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Fix from @arnoudvanderleer merged for 4.0 beta 8.

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant