Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Before VFP9, every math exp loses the DOUBLE datatype ?
Message
 
To
18/09/2006 07:15:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01154594
Message ID:
01154600
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform