'if' problem

Mark is showing you an example of the ternary operator. It has the general form:

x = expression1 ? expression2 : expression3;

Expression1 is some form of conditional expression. In your example, it is a test on signal1. If signal1 evaluates to logic True, expression2 is evaluated. If expression1 is logic False, expression3 is evaluated. The result is assigned into x. Since your if-else statement is deciding whether to pass 70 (i.e., logic True) or defPos (i.e., logic False), Mark rewrote the ternary as:

servo1.write (expression1?expression2: expression3) ;

or

servo1.write (signal1 ? 70 : defPos) ;