Re: [Vala] converting from float to double?



To describe a float literal use a trailing "f" like this:

        float x = 12.34f;


Martin



Yu Feng wrote:
Greetings,

I am receiving compiler errors for this:

float a = 0.0;

Shouldn't this be converted automatically?

I use
float a = (float)0.0
as a correction.

But doesn't it look non-intuitive?

Regards,

Yu

_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]