Mail Archives: djgpp/1997/07/26/17:33:20
John M. Aldrich wrote:
> > Maybe its not supposed to be done this way at all but the
> > compiler does'nt complain about it!!
>
> It may be that the compiler thinks you are declaring X in that
> statement, and therefore allocates an automatic variable. Y would then
> be assigned the value of that uninitialized variable. It's strange...
> and only possible in C++. If you compiled that as C it would have
> caused a syntax error.
Not sure what the original poster could be referring to:
double f;
unsigned char uc;
uc = (unsigned char f);
is a compile error in both C and C++.
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Love is not love which alters / when it alternation finds."
/ William Shakespeare, _Sonnets_, 116
- Raw text -