comp.lang.ada
 help / color / mirror / Atom feed
From: Jerome Desquilbet <jDesquilbet@Rational.COM>
To: Noam Kloos <noam@3wis.nl>
Subject: Re: simple time display
Date: 1997/01/16
Date: 1997-01-16T00:00:00+00:00	[thread overview]
Message-ID: <32DE3D16.167E@Rational.COM> (raw)
In-Reply-To: 32DCD770.60BB29B1@3wis.nl


> package durationIO is new ada.text_io.decimal_io(DURATION);
> use durationIO;
> 
> [...] cannot instantiate durationIO because it wants a
> decimal type for its parameter Num.
> 
> What whould be the simplest way to just pprint the current time in 
> ada?

with Ada.Text_Io;

procedure Test is

    package Duration_Io is new Ada.Text_Io.Fixed_Io (Duration);
    D : Duration := Duration'Small;

begin
    Ada.Text_Io.Put_Line (Duration'Image (D));
    Duration_Io.Put (D);
    Ada.Text_Io.New_Line;
end Test;

______________________________________________________________________
Jerome Desquilbet                             jDesquilbet@Rational.COM
 ' ^




  parent reply	other threads:[~1997-01-16  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-15  0:00 simple time display Noam Kloos
1997-01-16  0:00 ` Jerome Desquilbet
1997-01-16  0:00 ` Jerome Desquilbet [this message]
1997-01-25  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox