File : messages.ads


with Reps;
use Reps;

package Messages is

  type Problem is (Division_By_Zero, Index_Error, Parity_Error,
                   Parameter_Error, Domain_Error, Domain_Violation,
                   Numeric_Only, Not_Implemented, Giving_Up);

  procedure Message(Where: in String; What: in Problem);

  procedure TraceEnter(Where: in String);
  procedure TraceLeave;
  procedure Trace;

  procedure Show(S: in String; NewLine: in Boolean := True);
  procedure Show(S: in String; I: in Integer; NewLine: in Boolean := True);
  procedure Show(S: in String; R: in Rep; A: in Natural := 5; E: in Natural := 3);
  procedure Show(S: in String; R1,R2: in Rep; A: in Natural := 5; E: in Natural := 3);

  function GetArg(N: Positive) return String;
  function GetArg(N: Positive) return Integer;
  function GetArg(N: Positive) return Rep;      -- careful, input may get rounded

private

  Tracing: Boolean := False;
  TraceLevel: Integer := 0;

end Messages;