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,a90718b61c5de714 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: assignments using different types Date: 1997/01/29 Message-ID: <5co1nu$h35@news2.delphi.com>#1/1 X-Deja-AN: 213025821 organization: Delphi Internet Services Corporation newsgroups: comp.lang.ada Date: 1997-01-29T00:00:00+00:00 List-Id: > 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.)