
I found these instructions in a manual about a computer programming language. Perhaps because of wording like this there are not more programmers than there are:
Finally, since the result of the assignment in the parentheses was non-zero, the entire expression is evaluated as “true”, and “z” is assigned the value of 1000. Thus we accomplished two things in this statement, we assigned “x” a new value, probably 1, and we assigned “z” the value of 1000. We covered a lot in this statement so you may wish to review it before going on. The important things to remember are the values that define “true” and “false”, and the fact that several things can be assigned in a conditional statement. The value assigned to “x” was probably a 1 but different compilers may assign a different value as long as it is non-zero.
Continuing on to the fourth example of the third group we find three assignment statements in the compare part of the “if” statement. If you understood the above discussion, you should have no difficulty understanding that the three variables are assigned their respective new values, and the result of all three are non-zero, leading to a resulting value of “TRUE.”
Pictured above: Some of your author’s code for a picture puzzle program written about ten years ago.