Public Function FractionalToReal( _ ByRef rReal As Variant _ , Optional ByVal vSupportStringDates As Variant _ ) As Boolean
Assuming Dim varNum As Variant varNum = "3/4" for example FractionalToReal(varNum) = True leaves varNum = .75Example:
Assuming Dim varNum As Variant varNum = 34.5 for example FractionalToReal(varNum) = True leaves varNum = 34.5See also:
FractionalToRealSample Subroutine ComplexStringToReals FunctionNote: This function is substantially similar to the ComplexStringToReals function except that ComplexStringToReals works on complex numbers instead of fractions.
FractionalToReal("4/5") = True FractionalToReal((varNum)) = True ' #2since Visual Basic cannot modify ByRef (By Reference) arguments that are really passed ByVal (By Value). In example #2, varNum will not be replaced with its numeric equivalent (.8) because by putting the variable in parentheses will force VB to pass it by value.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.