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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a90718b61c5de714 X-Google-Attributes: gid103376,public From: Thomas C. Brooke, Subject: Re: assignments using different types Date: 1997/01/30 Message-ID: <5cp84h$a9o@chronicle.concentric.net>#1/1 X-Deja-AN: 213156784 organization: Concentric Internet Services reply-to: ntbrooke@concentric.net newsgroups: comp.lang.ada Date: 1997-01-30T00:00:00+00:00 List-Id: -- On 29 Jan 1997 17:34:54 GMT, tmoran@bix.com wrote ... > > Velocity := Velocity_Type(float(Distance) / float(Time)); > >Can anyone provide me with suggestions to improve the readability > >of the above assignment? Of course, I'd like efficiency to be > > How about creating > > function "/"(Distance : in Distance_Type; > Time : in Time_Type) > return Velocity_Type is > begin > return Velocity_Type(float(Distance) / float(Time)); > end "/"; > > and then you will be able to write > > Velocity := Distance / Time; > > (Actually, your current statement is quite readable - though tedious > to write.) --