Scientific notation in Foxpro? 
Author Message
 Scientific notation in Foxpro?

I was wondering if anyone has ever had to store, print and/or use
very large or very small numbers (i.e., 5e-30, 6.2e+26 and so on)
in a Foxpro application, and if so how did you work around the
limitations of the float (20-character) data type?

I suppose I could store the number 6.2e+26 using two fields:
storing the '6.2' in one field and the '26' in another.
This seems kind of clunky, because every time I would
need to use the value in a calculation or a report I'd have to put
it together using some sort of UDF.  It seems that there would be
a lot of places where the entire user interface would fall down in terms
of supporting these data values -- I'm not an experienced enough
Foxpro developer even to think of all the things that would be affected
(although formatting, reporting, and calculation all come to mind
immediately.)

I wonder if anyone has found a way to get Foxpro to support these
kinds of data values more directly, and if not, what suggestions folks
might have regarding the simplest way to work around Foxpro's built-in
limitations.



Mon, 23 Dec 1996 03:04:52 GMT
 Scientific notation in Foxpro?

You could always fall back on the old method of computing PI.

Method #1:

        Use multiple integer areas to store the number (similar to you
        using a floating point area).

Method #2:

        Use a string variable to hold the value.  You use the formatting
        capabilities of the STR() command to store the string and use the
        VAL() command to extract it.

Both methods would be slow though. :/

--------------------------------------------------------------------------------

Freedom of thought is given by your deity.
Freedom of speech by your government.
Everything else you have to get yourself.



Mon, 23 Dec 1996 08:30:28 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. scientific notation in FoxPro

2. Doing away with the scientific notation

3. How to avoid scientific notation?

4. Enterprise Manager - Scientific Notation

5. Print without Scientific Notation

6. Scientific Notation - Float datatype

7. !---Scientific Notation

8. NVARCHAR field converting integers to scientific notation

9. scientific notation

10. Converting numeric in scientific notation in char field to integer

11. !---Scientific Notation in tables

12. scientific notation (or symbols) into SQL SERVER 7


 
Powered by phpBB® Forum Software