First it's doing the comparison input != 1
, and then assigning the result of that (which will be true
or false
) the variable value
. The !=
is a comparison, the =
is an assignment.
This is exactly the same as any other assignment: The right-hand side is evaluated, and assigned to the left-hand side.