Hello I have a question about code syntaxis:
If I change "break:" by delay(time). means the same thing?
What is the equivalent meaning of that?
Hello I have a question about code syntaxis:
If I change "break:" by delay(time). means the same thing?
What is the equivalent meaning of that?
Posting pictures of code is discouraged. Please consider editing your post and posting the code in code tags.
No. They are entirely different things.
Google:
Arduino Break
Arduino delay()
Also google: c++ switch case break
guessing you're asking about "break" in a switch statement.
one option is to have return which exits the function
another option is not to have break which continues processing of the next case which makes sense in some situations
in general, break replaces the use of goto which also have valid uses that can significantly simplify code when done properly.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.