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: Matthew Heaney Subject: Re: Putting a 'Duration' on the screen ? Date: 1999/01/19 Message-ID: #1/1 X-Deja-AN: 434322828 Sender: matt@mheaney.ni.net References: <36A37529.69BFB3FF@cs.kuleuven.ac.be> <36A37C1F.2A4C3188@top.monad.net> NNTP-Posting-Date: Mon, 18 Jan 1999 23:08:14 PDT Newsgroups: comp.lang.ada Date: 1999-01-19T00:00:00+00:00 List-Id: Steve O'Neill writes: > Emmanuel Lambert wrote: > > > 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. > > The hint is - Duration is not a floating point type, it's a fixed point > type. Either instantiate Fixed_IO for Duration or convert the duration > object to float. No, do not convert Duration to float. You can either: 1) Use an instantiation of Ada.Text_IO.Fixed_IO; or 2) Use the attribute Duration'Image (X). The 2nd option is easier. -- Those who believe in the supernatural should be required to learn computer programming. This would force them to discover that things which appear at first to be completely mysterious and incomprehensible, in fact have a logical (and usually simple) explanation. --J.B.R. Yant