Today my students were using GlowScript to plot the intensity profiles for single and two slit diffraction. They came up with the following code:
They were having trouble getting all the parentheses right, so I showed them the matching parenthesis highlighting feature in the GlowScript editor, where putting the
cursor after an opening/closing parenthesis highlights the corresponding closing/opening parenthesis. Anyway, here's a couple of things that I noticed:
1.) There is different (green) highlighting for the middle term when you have two divisions in a row but only when the third term is surrounded by a parenthesis, e.g., a/b/(c).
This may be a bug or a feature, not sure.
2.) The parenthesis highlighting tool fails when the opening parenthesis is not green but the closing parenthesis is:
So things like
sin(a/(b))/c
highlights everything correctly, but
sin(a/(b))/(c)
does not. I would imagine this behavior leans more toward bug than feature.