comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: Re: Math on dimensioned quantities
Date: 1996/07/10
Date: 1996-07-10T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Jul10135751@organon.com> (raw)
In-Reply-To: DuB08H.2HI@world.std.com


In article <DuB08H.2HI@world.std.com> bobduff@world.std.com (Robert A Duff) writes:

> W. Wesley Groleau (Wes) <wwgrol@PSESERV3.FW.HAC.COM> wrote:
> >writers listening?--how about a pragma similar to
> >
> >   pragma Disallow ( Operation => "*", For_Type => Inch );
> 
> How about:
> 
>     function "*"(X, Y: Inches) return Inches is <>;
                                                  ^^ abstract

> ?  Then this particular "*" is abstract and therefore can't be called,
> and this is checked at compile time.  You can still multiply
> inches*inches to get square-inches.  It's annoying that you might have
> to declare lots of "is <>" functions, but I think it does solve the
                     ^^^^^^^ abstract

Ooops!  Does this mean you favored the preliminary box notation?

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





  reply	other threads:[~1996-07-10  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-09  0:00 Math on dimensioned quantities W. Wesley Groleau (Wes)
1996-07-09  0:00 ` progers
1996-07-10  0:00 ` Robert A Duff
1996-07-10  0:00   ` Jon S Anthony [this message]
1996-07-10  0:00     ` Robert A Duff
1996-07-10  0:00       ` Robert Dewar
1996-07-11  0:00         ` Dale Stanbrough
1996-07-10  0:00   ` progers
replies disabled

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