From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ccc963ff28188d78 X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Putting a 'Duration' on the screen ? Date: 1999/01/18 Message-ID: <36A38F05.EA6F4DD1@pwfl.com>#1/1 X-Deja-AN: 434110419 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <36A37529.69BFB3FF@cs.kuleuven.ac.be> To: Emmanuel Lambert Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1999-01-18T00:00:00+00:00 List-Id: Ada.Float_Text_IO doesn't work because Duration is not a floating point type. It is a fixed point type. You've got two choices here: with Ada.Text_IO.Fixed_IO ; procedure Blah_Blah_Blah is package My_Fixed_IO is new Ada.Text_IO.Fixed_IO ( Num => Duration) ; -- After this, you have a procedure My_Fixed_IO.Put you can call... ... ... ... *OR* Ada.Text_IO.Put_Line ("Current Duration: " & Duration'Image (X)) ; where X above is declared to be of type Duration. The numeric types have the 'Image attribute which will return a string. See the ARM 3.5 (35) for a definition. Hope this helps. MDC Emmanuel Lambert wrote: > > Hi, > > I am freaking out because I would like to output a variable from type > Duration to the screen, but it does not work with put(...). I have > included Ada.Float_Text_Io, but that does not help. Can someone give me > a hint. I a unable to find good documentation on this. > > Thanks > Emmanuel Lambert -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 Ph: 561.796.8997 Fx: 561.796.4669 ***To reply, remove "bogon" from the domain name.*** "Nobody shot me." -- Last words of Frank Gusenberg when asked by police who shot him fourteen times with a machine gun in the Saint Valentine's Day Massacre.