From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Overhead for type conversions?
Date: Fri, 25 Jul 2003 13:28:05 -0500
Date: 2003-07-25T13:28:05-05:00 [thread overview]
Message-ID: <vi2tihqnt6onc2@corp.supernews.com> (raw)
In-Reply-To: pan.2003.07.25.01.01.43.5699@mail.utexas.edu
"Bobby D. Bryant" <bdbryant@mail.utexas.edu> wrote in message
news:pan.2003.07.25.01.01.43.5699@mail.utexas.edu...
>
> Given these declarations -
>
> type f1 is new float;
> type f2 is new float;
>
> function "*"( left : in f1; right : in f2 ) return f1 is
> begin
> return( left * f1( right ) );
> end "*";
Matt answered your original question correctly, I think.
But I wanted to point out that you are likely to get into trouble with
expressions containing literals if you actually have such declarations in
your program.
V1, V2 : F1;
V2 := V1 * 12.0; -- Ambiguous (12.0 could have type F1 or F2).
V2 := V1 * F1'(12.0); -- OK.
So you might have to modify essentially all literal uses in that code.
Randy.
next prev parent reply other threads:[~2003-07-25 18:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-25 1:01 Overhead for type conversions? Bobby D. Bryant
2003-07-25 2:36 ` Robert I. Eachus
2003-07-25 7:12 ` Bobby D. Bryant
2003-07-25 15:34 ` Matthew Heaney
2003-07-25 18:28 ` Randy Brukardt [this message]
2003-07-26 15:54 ` Nick Roberts
2003-07-26 16:01 ` Warren W. Gay VE3WWG
2003-07-26 23:39 ` Bobby D. Bryant
2003-07-27 13:41 ` Loop Optimisation [was: Overhead for type conversions?] Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox