$TEST serves as the implicit argument for ELSE commands and argumentless IF commands.
Neither $SELECT() nor post-conditional expressions modify $TEST.
M routines cannot modify $TEST with the SET command.
IF x=+x DO ^WORK ELSE SET x=0
SET MYFLG=x=+x IF MYFLG DO ^WORK IF 'MYFLG SET x=0
IF x=+x DO ^WORK IF 1 ELSE SET x=0
This example uses the IF 1 to ensure that the ELSE works counter to the IF.