You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running one of Dan Shiffman's examples, it failed on the size(863,863/2); line in the setup(). The error said to look at the documentation for the size() function. The only requirement was for the size() function to be in the setup() function as the first line and for it to be in the processing sketch named the same.
However, it appears the size() can't have arithmetic expressions as part of the argument list.
Description
When running one of Dan Shiffman's mandelbrot example sketch, it failed on the size(863,863/2); statement in the setup() function. The error said to look at the documentation for the size() function.
The documentation for size():
size() function must be in the setup() function as the first line
and for size() to be in the main processing sketch.
However, it appears the size() can't have arithmetic expressions as part of the argument list.
Expected Behavior
expected the size(863,863/2); to work or with integer variables as arguments
Current Behavior
sketch won't run, error messages says size() can't be used here, changing it to size(863,431); got it to work.
Steps to Reproduce
include a size(863,863/2) as the first statement in the setup() function of a simple sketch
voidsetup() {
size(863,863/2);
}
voiddraw() {
}
run program
should see error below sketch code
Your Environment
Processing version: 4.0.1
Operating System and OS version: MacOS 10.13 Ventura
Other information: Running on a macmini with Apple M1 chip
Possible Causes / Solutions
workaround is to do the sizing math and keep size(863,431); arguments as simple integer constants.
provide a better error message that points to the arguments as not being simple integers.
The text was updated successfully, but these errors were encountered:
@sampottinger this would be a preproc issue… the reference should say that you should only use numbers there (it says not to use variables, but I didn't think of writing equations as a way to break it…) but we should be able to allow this.
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.
Created by: jedishrfu
When running one of Dan Shiffman's examples, it failed on the size(863,863/2); line in the setup(). The error said to look at the documentation for the size() function. The only requirement was for the size() function to be in the setup() function as the first line and for it to be in the processing sketch named the same.
However, it appears the size() can't have arithmetic expressions as part of the argument list.
Description
When running one of Dan Shiffman's mandelbrot example sketch, it failed on the size(863,863/2); statement in the setup() function. The error said to look at the documentation for the size() function.
The documentation for size():
However, it appears the size() can't have arithmetic expressions as part of the argument list.
Expected Behavior
expected the size(863,863/2); to work or with integer variables as arguments
Current Behavior
sketch won't run, error messages says size() can't be used here, changing it to size(863,431); got it to work.
Steps to Reproduce
Your Environment
Possible Causes / Solutions
workaround is to do the sizing math and keep size(863,431); arguments as simple integer constants.
provide a better error message that points to the arguments as not being simple integers.
The text was updated successfully, but these errors were encountered: