Hello Guys ,
I'm doing programming with PHP and I came across a difficult
situation where i couldn't get the exact logic of Type conversion of PHP
language . So expecting some valuable comments from you people..
The Code which laughed at me :
*<?php
echo (int)((0.1+0.7)*10);
?>*
As per the logic *ANSWER should be "8" but i'm getting only "7"*.. why it
is so ???
if the code is written as
*echo ((0.1+0.7)*10); *
//or
*echo (float) ((0.1+0.7)*10);*
then no issues in getting the answer "8"..
Regards,
Prabakaran K.
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc