Larry,Steve,Héctor ;-)
FWIW, you could use PADR() which respects the decimals and also works in prior versions of VFP:
x = 456.461
x = x + .0010
? x
? transform(x)
?ALLTRIM(PADR(x, 20))
>Steve/Héctor,
>With VFP 7 SP1, the precision is stored by VFP and using transform doesn't change it.
>
>x = 456.461
>x = x + .0010
>? x
>? transform(x)
>VFP will do this until it reaches it reaches its limit of 16 digits of precision (combination of whole and decimal values).
>
>HTH.
>
>>Héctor,
>>
>>Thats a tricky question. For example:
>>
>>
>>x = 456.4618
>>x = x + .0002
>>? x
>>
>>
>>I don't really see how it can be done, because the x in the above example is accurate to the ten-thousandths position. Any attempt to use a function such as MOD() or TRANSFORM() to determine the precision would indicate that it is only accurate to the thousandths position.
>>
>>Of course determining the length to the left of the decimal is a piece of cake.
>>
>>I'm curious...what do you need this information for?
>>
>>>Hi, I need to make a function wich returns the lenght of a numeric expresion. Lets say that I have a number, 456.4618 and I want to know how many integers and decimals positions there are. This function must return that there are 3 integers and 4 decimals.
>>>
>>>Any idea?
>>>
>>>Thanks
Daniel