(defrule readin
?f<-(initial-fact)
=>
(retract ?f)
(assert (number (read)))
)
(defrule writeout
?f<-(number ?n)(test (<> ?n 42))
=>
(retract ?f)
(printout t ?n crlf)
(assert (initial-fact))
)
(reset)
(run)
(exit)
; empty line at the end
KGRlZnJ1bGUgcmVhZGluCgk/ZjwtKGluaXRpYWwtZmFjdCkKPT4KCShyZXRyYWN0ID9mKQoJKGFzc2VydCAobnVtYmVyIChyZWFkKSkpCikKCihkZWZydWxlIHdyaXRlb3V0Cgk/ZjwtKG51bWJlciA/bikodGVzdCAoPD4gP24gNDIpKQo9PgoJKHJldHJhY3QgP2YpCgkocHJpbnRvdXQgdCA/biBjcmxmKQoJKGFzc2VydCAoaW5pdGlhbC1mYWN0KSkKKQoKKHJlc2V0KQoKKHJ1bikKCihleGl0KQo7IGVtcHR5IGxpbmUgYXQgdGhlIGVuZA==