Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does y -= m < 3 mean?

Tags:

c

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.

like image 720
TheTedinator Avatar asked Oct 22 '11 23:10

TheTedinator


1 Answers

m < 3 is either 1 or 0, depending on the truth value.

So y=y-1 when m<3 is true, or y=y-0 when m>=3

like image 188
Wei Shi Avatar answered Sep 30 '22 06:09

Wei Shi