comp.lang.ada
 help / color / mirror / Atom feed
From: Sazonov Cyril <cyril@geol.spb.su>
Subject: Re: What's with GNAT?
Date: 1996/12/30
Date: 1996-12-30T00:00:00+00:00	[thread overview]
Message-ID: <AAAOvnoyZ4@geol.spb.su> (raw)


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




             reply	other threads:[~1996-12-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-30  0:00 Sazonov Cyril [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-12-27  0:00 What's with GNAT? Sazonov Cyril
1996-12-28  0:00 ` burnsedbw
1996-12-26  0:00 BurnsedBW
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox