>Is there a command that returns the decimal precision of a variable?
>
>Example a=1.00 is 2 decimal
> a=1 is 0
>
>TIA
Try following function
FUNCTION LenDecimals
LPARAMETER tnTestNum
LOCAL lcNumber, lnPos, lnResult
lcNumber = LTRIM( PADL( tnTestNum, 99))
lnPos = AT( ".", lcNumber)
IF lnPos = 0
lnResult = 0
ELSE
lnResult = LEN( lcNumber) - lnPos
ENDIF
RETURN lnResult
Bye
Jayesh
- Jayesh