The $endif (and $else) commands are used to end a set of IIF commands which have been conditioned using $if, $ifn, $ife or $ifne. The proper terminating commands must always be provided.
$if @code = 1
$next_box good ; transfer to good.iif
$next box bad ; transfer to bad.iif