>
>      I have just been bitten by SET DECIMALS.  (Is there really any use for
> this besides making programming just a bit more difficult?)
>

There may have been, when it was invented in the dBASE days. I believe
it does not affect values, only their display.

>      I have a table with values to four decimal places.  I use
> <vfp>
>           transform(thevalue,"999999.9999")
> </vfp>
> to create the string representation.  With SET DECIMALS set to its default
> value, a value of 0.0123 is converted to "     0.0100" which loses two
> digits of precision.

What if you multiplied the number by 10^4? Would the precision still
be there, only not displayed?

>      I had this problem with another data item that had more than two
> decimal places.  I wrote a special function to handle it by setting SET
> DECIMALS to the number of decimal places I needed, doing the transform(),
> and setting SET DECIMALS back to the default.

>      Why did I do that?

That is probably the crux of the matter.

> BUT also, because I
> really do not understand the point of SET DECIMALS.
>

Is there someplace you could look it up? A reference guide of some sort?


-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cacw6n4uk9xjcafwuafneqymamragxzbgaz5jbbmjwbxvfpe...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to