Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Before VFP9, every math exp loses the DOUBLE datatype ?
Message
 
À
18/09/2006 07:15:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01154594
Message ID:
01154600
Vues:
10
Hi Fabio,

In DBF is 1.2345677888E+300
The big value is saves as string...

MartinJ

>This example show that, without CAST(),
>a SELECT's numeric expression store the result into a NUMERIC field.
>
>It is true ?
>If yes, the type double doesn't serve to anything.
>
>Look: strangeNumeric
>Another strange thing is that for very great values
>(what cannot be represented with a ASCII NNNNNNN.NNNN string)
>Does VFP succeed in memorizing in a NUMERIC(20?) the value double.
>I have not time to hack the dbf.
>
>
>CREATE CURSOR tt (ff B)
>APPEND BLANK
>
>SELECT ff                      as copyDouble;
>       ,1e-19                  as literalDouble ;
>       ,CAST(1e-19 as B)       as castLiteralDouble ;
>       ,ff+1e-21               as literalexp ;
>       ,CAST(ff+1e-19 as B)    AS castExpdouble;
>       ,1.2345677888e300       AS strangeNumeric;
>        FROM tt INTO CURSOR result
>
>* copyDouble		DOUBLE
>* literalDouble 	NUMERIC
>* castLiteralDouble     DOUBLE
>* literalDouble 	NUMERIC
>* castExpdouble		DOUBLE
>* strangeNumeric	NUMERIC
>CLEAR
>
>LIST STRUCTURE
>
>? TRANSFORM(	copyDouble          ,"@^")
>? TRANSFORM(	literalDouble       ,"@^")
>? TRANSFORM(	castLiteralDouble   ,"@^")
>? TRANSFORM(	literalexp          ,"@^")
>? TRANSFORM(	castExpdouble       ,"@^")
>? TRANSFORM(	strangeNumeric	    ,"@^")
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform