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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d2a3144038a5a80e,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!195.238.0.231.MISMATCH!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Sat, 13 Jun 2009 17:51:17 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Question on types conversions - operations Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4a33cb0b$0$2848$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 93214486.news.skynet.be X-Trace: 1244908299 news.skynet.be 2848 80.201.72.191:49140 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:6455 Date: 2009-06-13T17:51:17+02:00 List-Id: Hello, I have the following three types: type Length is new Float; type Time is new Float; type Speed is new Float; Suppose I need to compute a speed given a length and a time. L: Length := 100.0; T: Time := 10.0; S: Speed; How to do that ? With S := Speed(Float(L) / Float(T)) ? Mmmm ... not nice. With S := Speed(L / Length(T)), I am also not satisfy as I convert a time in Length ... I am sure you have better ideas ! Good weekend, Olivier