JavaScript does not require semicolons at the end of lines. For the most part, p5.js does not require semicolons at the end of lines.
Nevertheless, it appears that lines not ending in semicolons are being counted as errors “under the hood.” Given a sufficiently long program, p5.js will report “Too many errors,” and provide a display with “Missing semicolon” on each previous line. The limit appears to be around 100 semicolon-free lines.
It is easy to adjust exactly where this error occurs by adding or deleting semicolons.
Mac OS Mohave, 10.14.6
Processing 3.5.4
who said that?? Javascript require semicolons at the end…
Actually, JavaScript automatically inserts semicolons, so the programmer does not have to. I generally do in JS, but not in p5.js.
I wondered if I would get the same error with a JavaScript program longer than 100 lines, in which case it would be a JavaScript problem, rather than a p5.js problem. So I took an existing 850 line JS program and removed all the semicolons from it. It continues to work without errors.
Thanks for the welcome. Processing is great!
2 Likes
YUP; IT’S GREATEST FOR A GREAT. I’ve not used any js as such, only p5 and from that I thought, it was compulsory
It seems to be an error from the Processing editor so. The warn should not be repeted to avoid it : semicolons are as you said not compulsory in js, but remains a good practice !