Fw: [PHP-GTK] R: [PHP-GTK] GTK and doubleval

From: Date: Thu, 11 Sep 2003 11:13:09 +0000
Subject: Fw: [PHP-GTK] R: [PHP-GTK] GTK and doubleval
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3865@lists.php.net to get a copy of this message
Sorry, that won't have made a lot of sense .. There was a float/locale issue in some of the official PHP downloads which was resolved a few weeks ago. Get a more recent version and all should be well. ----- Original Message ----- From: "Steph" <steph@php.net> To: "Dimitri Giardina" <dimitri@cdinformatica.it>; "Php-Gtk-General" <php-gtk-general@lists.php.net> Sent: Thursday, September 11, 2003 11:10 AM Subject: Re: [PHP-GTK] R: [PHP-GTK] GTK and doubleval > Ah, it's Edin's old snap! > > (PHP issue, resolved). > > ----- Original Message ----- > From: "Dimitri Giardina" <dimitri@cdinformatica.it> > To: "Php-Gtk-General" <php-gtk-general@lists.php.net> > Sent: Thursday, September 11, 2003 10:03 AM > Subject: [PHP-GTK] R: [PHP-GTK] GTK and doubleval > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > these stranges italians ;) > > > > (under win32). > > > > $a = 41.490; (without apices) > > $b = 12.50; > > > > C:\tmp>php provafx.php (with apices, without gtk) > > 53.99 > > C:\tmp>php provafx.php (with apices, with gtk) > > 53 > > C:\tmp>php provafx.php (without apices, without gtk) > > 53.99 > > C:\tmp>php provafx.php (without apices, with gtk) > > 53,99 > > > > wow... > > i think it's a problem in localizing/printing float numbers. > > > > > > > > Dimitri Giardina > > > > > -----Messaggio originale----- > > > Da: SIMONE COSCI [mailto:simone@interworld.it] > > > Inviato: giovedì 11 settembre 2003 12.05 > > > A: php-gtk-general@lists.php.net > > > Oggetto: [PHP-GTK] GTK and doubleval > > > > > > > > > Hello, > > > I' ve found a problem about Variables Types using GTK... > > > Try this code using GTK and without them, I' ve different result ... > > > I have 2 strings (from DB) $a and $b that represent double values > > > ... if I call gettype($a) return String ... > > > I have to cast the Strings in Doubles and add $a to $b obtaining $t > ... > > > Without GTK the result is correct ... 53.99 ... > > > if I Uncomment the dl() (loading GTK classes) the result become > > > 53 (gtk trim decimals ?) > > > Try with doubleval() ... same result ... > > > > > > /* > > > if (!class_exists('gtk')) { > > > if (strtoupper(substr(PHP_OS, 0,3) == 'WIN')){ > > > dl('php_gtk.dll') or Die("dll not found"); > > > define("BAR","\\"); > > > define("LFCR","\r\n"); > > > }else{ > > > dl('php_gtk.so') or Die("so not found"); > > > define("BAR","/"); > > > define("LFCR","\n"); > > > } > > > } > > > */ > > > $a = "41.490"; > > > $b = "12.50"; > > > $a = floatval($a); > > > $b = floatval($b); > > > $t = $a + $b; > > > echo floatval($t); > > > //gtk::main(); > > > > > > Someone can help ? > > > > > > Tnx > > > > > > Simone > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.6 (MingW32) > > Comment: For info see http://www.gnupg.org > > > > iEYEARECAAYFAj9gSFcACgkQjbCncHBsBCKxKwCfTIsqi3OGq+yYWYLouQp0r0iT > > E2UAoLgR2FzODC4H+ujS/r1rSpZWBNMO > > =Cd55 > > -----END PGP SIGNATURE----- > > > > > > -- > > PHP-GTK General Mailing List (http://gtk.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.gtk.general (#3865) next »