Use this:
(if [condition]
then
(printout t "yikes 3" crlf)
(halt))
Where [condition] would be something like a variable, ?b, or an expression, (> 3 4). In the printout statement, t is the logical name which indicates where the output should be directed (in this case t indicates standard output) and crlf prints a carriage return/line feed (new line for the output). The (halt) statement halts execution of the rules after the current rule has finished executing. You could then restart execution by entering (run) at the command prompt. Alternately, the (exit) command will immediately terminate execution of the rule as well as CLIPS.