1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- MODULE Out; (** AUTHOR "FOF"; PURPOSE "Simple console output, for educational purposes"; *)
- (* threadsafe as far as commands don't share the same context *)
- IMPORT Commands, Streams;
- PROCEDURE GetWriter*(): Streams.Writer;
- BEGIN
- RETURN Commands.GetContext().out;
- END GetWriter;
- PROCEDURE String*(CONST s: ARRAY OF CHAR);
- BEGIN
- Commands.GetContext().out.String(s);
- END String;
- PROCEDURE Char*(c: CHAR);
- BEGIN
- Commands.GetContext().out.Char(c);
- END Char;
- PROCEDURE Ln*();
- BEGIN
- Commands.GetContext().out.Ln();
- END Ln;
- PROCEDURE Set*(s: SET);
- BEGIN
- Commands.GetContext().out.Set(s);
- END Set;
- PROCEDURE Int*(i: HUGEINT; n = 1: LONGINT);
- BEGIN
- Commands.GetContext().out.Int(i,n);
- END Int;
- PROCEDURE Hex*(i: HUGEINT; n = -16: LONGINT);
- BEGIN
- Commands.GetContext().out.Hex(i,n);
- END Hex;
- PROCEDURE Address*(a: ADDRESS);
- BEGIN
- Commands.GetContext().out.Address(a);
- END Address;
- PROCEDURE Float*(x: LONGREAL; n = 4, f= 3, d=0: LONGINT);
- BEGIN
- Commands.GetContext().out.FloatFix(x,n,f,d);
- END Float;
- END Out.
- SystemTools.Free Out ~
- Out.Hello
|