The logical negation operator
First I want to call your attention to the use of the logical negation operator (!) in the conditional clause in Listing 4.
Note its position relative to the parentheses used to group the termns.
Note that it is applied to the result of evaluating everything enclosed in the matching pair of parentheses immediately to its right.