File : numerics-io.adb


with Reps.IO;
use Reps.IO;

package body Numerics.IO is

  procedure Show(S: in Numeric; NewLine: in Boolean := True) is
  begin
    Txt_Put(Current_Output,Rep(S),True);
    if NewLine then New_Line; end if;
  end Show;

  procedure Get(F: in File_Type; S: out Numeric; Decimal: in Boolean := True) is
    R1,R2: Rep;
  begin
    Txt_Get(F,R1,R2,Decimal);
    S := Numeric(R1);
  end Get;

  procedure Put(F: in File_Type; S: in Numeric; Decimal: in Boolean := True) is
  begin
    Txt_Put(F,Rep(S),Decimal);
  end Put;

end Numerics.IO;