We are about to switch to a new forum software. Until then we have removed the registration on this forum.
If you code-format the sketch below, it pulls the word 'else' up into the comment on the previous line (i.e., it comments-out actual code). Seems to be the {}'s in the comment, which are probably pretty rare.
void setup() {
size(800, 600);
}
void draw() {
if (mouseX < width/2)
ellipse(mouseX, mouseY, 20, 20); // who uses { braces in comments? }
else
rect(mouseX, mouseY, 20, 20);
}
Answers
Please edit your post and format your code for the forum to make it more clear.
https://forum.processing.org/two/discussion/15473/readme-how-to-format-code-and-text
Would be happy to, but can't find a link to edit. Update: finally found it under the sun/gear icon. It's the only thing under there. Wish it just said 'edit' in the first place.
Also, maybe change link the "You can use Markdown in your post" so it goes to the link you posted. I wanted to format the code, and I clicked on the Markdown link, studied many of the paragraphs and examples there, and then finally gave up a little frustrated. No straightforward instructions there for formatting code.
Thanks for the link though! Next time I'll find this thread and go from there to find the Ctrl-o shortcut.
I can reproduce this in Processing 3.3.5 on macOS 10.12.5.
@ottenm -- you should report this issue here:
https://github.com/processing/processing/issues
P.S. That "how to format code" post is a sticky at the top of the forum, so you can always find it there.
The comment/uncomment feature has several bugs. Here is a recent ticket: https://github.com/processing/processing/issues/5171
Kf