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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!news-2.dfn.de!news.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: Question on types conversions - operations Date: Mon, 15 Jun 2009 11:51:24 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <4a33cb0b$0$2848$ba620e4c@news.skynet.be> <6e151h.kgc.ln@hunter.axlog.fr> <4a3614a9$0$2855$ba620e4c@news.skynet.be> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-169176672-1245059235=:24989" X-Trace: tigger.scc.uni-weimar.de 1245067248 10235 141.54.178.228 (15 Jun 2009 12:00:48 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Mon, 15 Jun 2009 12:00:48 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: <4a3614a9$0$2855$ba620e4c@news.skynet.be> Content-ID: Xref: g2news2.google.com comp.lang.ada:6478 Date: 2009-06-15T11:51:24+02:00 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323584-169176672-1245059235=:24989 Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1 Content-Transfer-Encoding: 8BIT Content-ID: > Jean-Pierre Rosen wrote: > > sjw a �crit : > > > > With S := Speed(Float(L) / Float(T)) ? Mmmm ... not nice. > > Why not nice? [...] > I thought it was not nice, because if I change the three types > Length, Time and Speed from Float to My_Float, then I have to modify: > S := Speed(My_Float(L) / My_Float(T)) Indeed! Better, you start with My_Float at the beginning type My_Float is new Float; -- change this, if you need type Length is new My_Float; type Time is new My_Float; type Speed is new My_Float; and later write S := Speed(My_Float(L) / My_Float(T)); This is logically the same as before, but you can change the definition of My_Float to whatever kind of floating-point operation you like ... So long Stefan -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------ --8323584-169176672-1245059235=:24989--