I was working on a project and unintentionally ran into the semicolon that ended up being inserted well after a
if . I was intrigued because Visual Studio did not point as an error, and when trying to compile the project I was successful.
The code looks like this:
Motivated by curiosity, I realized that you can also enter a semicolon at the end of a loop like
for , and
I showed it to a friend and he revealed the possibility of inserting the semicolon several times in sequence on the same line as the following:
}; ; ; ; ; ;
And yet the project is compiled without any problem.
Should not a compile error be generated?
Why is this allowed?