LindaRichard
Programmer
I have a series of numbers with various precisions:
For example
a(1)=12.34
a(2)=134.234
a(3)=1343456543.343234323
I wan't to transform these numeric values into strings
but I want to retain the original precision.
I know that for example, if I wanted to round to 2 digits
I could use
sTemp=str(a(1),4,2) this would yield "12.34"
The issue is that I don't know what precision will be
entered and I wan't to retain the value as it has been
entered.
I tried TRANSFORM and it works for the first two examples
"12.34"=TRANSFORM(a(1))
"134.234"=TRANSFORM(a(2))
but the third one gets padded with 0's after 16 digits
"1343456543.343234000" and the value is lost.
Does anyone have any suggestion on how to handle this.
VFP allows us to create numeric value of up to 20 in length
and 19 decimals, but the transformation to a string seems to
be limited to 16.
Thanks for your help
Linda
For example
a(1)=12.34
a(2)=134.234
a(3)=1343456543.343234323
I wan't to transform these numeric values into strings
but I want to retain the original precision.
I know that for example, if I wanted to round to 2 digits
I could use
sTemp=str(a(1),4,2) this would yield "12.34"
The issue is that I don't know what precision will be
entered and I wan't to retain the value as it has been
entered.
I tried TRANSFORM and it works for the first two examples
"12.34"=TRANSFORM(a(1))
"134.234"=TRANSFORM(a(2))
but the third one gets padded with 0's after 16 digits
"1343456543.343234000" and the value is lost.
Does anyone have any suggestion on how to handle this.
VFP allows us to create numeric value of up to 20 in length
and 19 decimals, but the transformation to a string seems to
be limited to 16.
Thanks for your help
Linda