Re: Is cast operator unary or binary? How many operands?
- From: jacob navia <jacob@xxxxxxxxxx>
- Date: Wed, 30 Apr 2008 16:34:53 +0200
Richard Tobin wrote:
In article <fv9s2t$mu7$1@xxxxxxxx>, jacob navia <jacob@xxxxxxxxxx> wrote:
When I write
(double)i;
I am conceptually calling
double TransformIntegerToDouble(int);
Why are you not conceptually calling Transform(int, double)?
-- Richard
Because the "int" is the RESULT type, not the input type!
Besides, a hyper hyper generic procedure:
Transform(anything,anything)
is just a dream...
You can have only concrete procedures:
Something TransformToSomething(something_else);
TransformIntegerToDouble exists (at least in lcc-win),
and will take care of the details, correct rounding, etc etc.
Transform(int,double) doesn't exist and can't exist since
it would have to take ANY two input types and transform the
second into the first, an impossible task!
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.
- Follow-Ups:
- Re: Is cast operator unary or binary? How many operands?
- From: Richard Tobin
- Re: Is cast operator unary or binary? How many operands?
- References:
- Is cast operator unary or binary? How many operands?
- From: JoseMariaSola
- Re: Is cast operator unary or binary? How many operands?
- From: jacob navia
- Re: Is cast operator unary or binary? How many operands?
- From: Richard Tobin
- Is cast operator unary or binary? How many operands?
- Prev by Date: Re: Doubt about array's name
- Next by Date: Re: Doubt about array's name
- Previous by thread: Re: Is cast operator unary or binary? How many operands?
- Next by thread: Re: Is cast operator unary or binary? How many operands?
- Index(es):