What is the meaning of this construction:
If (YES) {
//some code
}
I found some examples of this kind of usage and I really don’t understand what is the meaning of this if (YES).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It doesn’t do anything per-se. It’s probably a relic left over from when there was a condition in that place. When debugging it could be quicker to convert an expression to YES than to remove the if statement altogether. Alternatively the programmer could be experimenting toggling a particular block of code by manually switching between YES and NO while running tests.