digitalmars.D - hidden truncation
- Steve Adams (18/18) Jul 28 2004 I was looking over the types page for D on the web site. From the
I was looking over the types page for D on the web site. From the
description there, I'd expect the assignment statements below and the
call to generate an error, since each of these loses information. It
seems that there should be a cast required when information is lost.
void foo( int i, float f)
{
}
int main()
{
real r;
float f;
int i;
long l;
f = r;
i = l;
foo( l, r );
return( 1 );
}
Jul 28 2004








Steve Adams <adamss ascinet.com>