While looking through some example C code, I came across this:
y -= m < 3;
What does this do? It it some kind of condensed for loop or something? It’s impossible to google for as far as I know.
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.
m < 3is either1or0, depending on the truth value.So
y=y-1whenm<3istrue, ory=y-0whenm>=3