I was doing some testing on what is our “state bot”, and discovered that motors (v5) were running at full speed for 3 seconds (exactly timed it multiple times) then cut to about half power after then until they were reactivated (button pressed again). I’ve narrowed down the problem to an accidental layered comment in my program. Has anyone else encountered this problem? (Yes, I know that layered comments can cause problems in certain compilers, just wondering).
What is a “layered comment”?
If I am understanding correctly I think he is talking about muti line comments
Sorry, comments inside comments
Please post an example.
What is the purpose of doing comments in this manner?
Also, for future reference: How to post code on the forum
It was a mistake to begin with, I’m now using ifdef to control commented code. I was wondering if anyone had experienced simaler issues if they had done the same thing (since the behavior is somewhat random and had nothing to do with the commented code)
Also thanks for the reminder of using BBcode!
I’ve had layered comments give me all sorts of issues in many different coding languages and platforms, when coding anything I highly suggest avoiding doing them. nothing worse then when random lines get ignored or lines meant to be ignored break the program.
These “layered comments” don’t work in c++. I’m surprised your editor didn’t underline one of the */ and throw an error. The only language that I know for sure supports these things is swift.