From: progers@acm.org
Subject: Re: Math on dimensioned quantities
Date: 1996/07/10
Date: 1996-07-10T00:00:00+00:00 [thread overview]
Message-ID: <4s0g7q$dca@uuneo.neosoft.com> (raw)
In-Reply-To: DuB08H.2HI@world.std.com
In <DuB08H.2HI@world.std.com>, bobduff@world.std.com (Robert A Duff) writes:
>In article <9607091345.AA03915@most>,
>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 <>;
>
>? 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
>problem.
Bob's memory is too good :) The "<>" syntax was changed to use the
reserved word "abstract".
pat
---------------
Patrick Rogers
progers@acm.org
prev parent 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
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 [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox