Moodle is based on PHP. This is a PHP shorthand if. It probably should be in the moodle documents but be careful relying on it. I wrote a number of questions that use the formulas to do variable text questions and within months, moodle administrators determined that only numbers should be allowable results, breaking all those questions.
Here is a link:
http://davidwalsh.name/php-ternary-examples
An internet search for the terms "shorthand PHP if" should yield more results.