B
Bruno van Dooren
Hi,
i have a simple question that has bothered me for some time now.
if i have a function foo( double a)
and i do something like
float b = 2.0;
foo(b);
* can i safely assume that the compiler will convert b to a double?
and if i do foo(20) //notice that i coded an integer number
* will vc do the correct conversion?
i ask this because recently i had to work with an archaic HP-UX compiler
that tried to use a binary represtation of the integer '20' as a floating
point. i was wondering if vc is smarter. if it is not, where should i look
for documentation about this?
i used to think that this was a non-issue, but apparently this is not always
true.
* and while i am on that subject, is it correct that there is no way for
format specifiers to work with double precision floats?
kind regards,
Bruno.
i have a simple question that has bothered me for some time now.
if i have a function foo( double a)
and i do something like
float b = 2.0;
foo(b);
* can i safely assume that the compiler will convert b to a double?
and if i do foo(20) //notice that i coded an integer number
* will vc do the correct conversion?
i ask this because recently i had to work with an archaic HP-UX compiler
that tried to use a binary represtation of the integer '20' as a floating
point. i was wondering if vc is smarter. if it is not, where should i look
for documentation about this?
i used to think that this was a non-issue, but apparently this is not always
true.
* and while i am on that subject, is it correct that there is no way for
format specifiers to work with double precision floats?
kind regards,
Bruno.