Date: 08/15/00
- Next message: Remco Chang: "Re: [PHP] bug? php4 with libmcrypt-2.2.7"
- Previous message: peter tatischev: "Re: [PHP] for all you recursion experts--i'm stuck! help!"
- In reply to: callen: "[PHP] odd addition error<>?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What are you initializing these values to before using them? The only
variable that is being initialized in the code sample that you sent is the
$handling variable.
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello <email protected>
-----Original Message-----
From: root [mailto:root] On Behalf Of callen
Sent: Tuesday, August 15, 2000 2:24 PM
To: PHP General List
Subject: [PHP] odd addition error<>?
Greetings!
The following bit of code gives a strange result!
At one point it comes out with the correct values, such that the
addition that is performed is correct.
At line 2 $fee always is what it should be (lets say 3.71), when it gets
down to line 4 sometimes the value of $sh is 0.
The value of $fee changes based upon a block of code that it comes from,
these two different blocks of codes are
based upon simple if statements , and the variable $fee always carries
its value to line 2.
If the script goes thru the first block of code it performs the addtion
correctly, if it goes thru the second
The addition fails at line 3 (line 4 echoes out SH is: 0), although the
value $fee is correct in line 2.
what can this possibly mean?
????
1) $handling =2;
2) echo "Fee again is $fee <br>";
3) $sh += $fee;
4) echo "SH is: $sh <br>";
5) $sh += $handling;
-- Christopher C.M. Allen http://design.driver8.org/ Email: callen <email protected>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Remco Chang: "Re: [PHP] bug? php4 with libmcrypt-2.2.7"
- Previous message: peter tatischev: "Re: [PHP] for all you recursion experts--i'm stuck! help!"
- In reply to: callen: "[PHP] odd addition error<>?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

