(* Out and C's printf, writing to the same standard output. Each keeps a buffer of its own, so each is flushed before the other writes. *) module Printf; import Out, C; import SYSTEM; proc main*; var i: INT; begin for i := 1 to 3 do Out.str("raz says "); Out.int(i); Out.ln; Out.flush; _ := C.printf("C says %d, %s\n", I32(i * i), "squared"); _ := C.fflush(C.stdout); end; end; end Printf.