Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 7 users need to key scienific numbers not just display

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
US
I know how to format for scientific display after the data is keyed in as numeric data. But they want to key in the data using the scientific equivalent of the number. Must be great to be smart.

Text may be a solution but would be cumbersome with the conversion and loops that has to be done to use math.

 
Betty,
The following are the way to convert back and forth. As you suggested, if you at least get the number in a character field, you can convert it before you store it. (Note: You can't have any embedded spaces for the EVAL() to work.)

?TRANSFORM(7123456,"@^")
?EVAL("7.123456E+6")

Remember that a Numeric (or Float) field has a range of from - .9999999999E+19 to .9999999999E+20, while a Double can be +/-4.94065645841247E-324 to +/-8.9884656743115E307.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top