procedure Gen() write("Gen: Starting up...") suspend 3 write("Gen: More computing...") suspend 7 write("Gen: Out of gas...") fail # not really needed end procedure main() while writes("Value? ") & n := integer(read()) do { if n = Gen() then write("Found ", n) else write(n, " not found") } end