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,e6dde7d957da14ec X-Google-Attributes: gid103376,public From: Sazonov Cyril Subject: Re: What's with GNAT? Date: 1996/12/30 Message-ID: #1/1 X-Deja-AN: 206812447 distribution: all sender: news@ssrun.arcom.spb.su organization: RIKC SZRGC newsgroups: comp.lang.ada x-return-path: geol!geol.spb.su!cyril@bulldozer.arcom.spb.su Date: 1996-12-30T00:00:00+00:00 List-Id: BwB wrote me: > However, I believe the LRM para 6.4.1 (4) clearly states that conversion > occurs in _both_ directions. As I can see it is high time for me to re-read the LRM ! > For reasons I will not take time to mention, we consciously chose to avoid > declaring intermediate variables whenever possible. As for me, I don't like them too. But sometimes.... And what about functions ? Or just operations ? Something like this : function Multiply ( Left, Right : in Global.Cartesian_Vector ) return Global.Cartesian_Vector ; .......................................................................... function Multiply ( Left, Right : in Global.NED_Vector ) return Global.NED_Vector is begin -- Multiply return Global.NED_Vector ( Multiply ( Global.Cartesian(Left), Global.Cartesian(Right) ) ; end Multiply; or better ( on my taste, this is the best way at all ) : function "*" ( Left, Right : in Global.Cartesian_Vector ) return Global.Cartesian_Vector ; .................................. function "*" ( Left, Right : in Global.NED_Vector; return Global.NED_Vector is begin -- Multiply return Global.NED_Vector ( Global.Cartesian(Left) * Global.Cartesian(Right) ) ; end Multiply; Happy New Year ! Best wishes from Russia ! Cyril Sazonov