Public Function RationalToFractionString( _ ByVal vRational As Variant _ ) As Variant
RationalToFractionString(2.4) = "2+2/5" RationalToFractionString(43.75) = "43+3/4" RationalToFractionString(-43.75) = "-43-3/4" RationalToFractionString(-43) = "-43"See also:
RationalToFraction Function FloatToFraction FunctionvRational: The number which is separated into its integer, fractional dividend, and fractional divisor parts. Function returns Null if vRational is Null or cannot be fixed up to a number. Note: When vRational is positive, the fraction will be of the form "X+Y/Z" and when vRational negative, the fraction will be of the form "-X-Y/Z". (When vRational is negative, the dividend will always be negative and the divisor will always be positive.)
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.