raz / test / run / Eprint.raz

13 lines · 330 B · raw · history · last change bc0ed42c

1(* Fmt.eprint flushes Out first: with standard error made standard
2 output, what was printed before comes before it. *)
3module Eprint;
4import Fmt, Out, Sys;
5
6proc main*;
7begin
8 _ := Sys.dupTo(Sys.stdout, Sys.stderr);
9 Out.str("printed first, ");
10 Fmt.eprint("{} {}\n", [Fmt.str("then"), Fmt.int(2)]);
11end;
12
13end Eprint.