Public Function RationalComplexToVBExpr( _ ByVal vExpr As Variant _ ) As Variant
? RationalComplexToVBExpr(12) 12 ? RationalComplexToVBExpr("12") 12 ? RationalComplexToVBExpr("12.45") 12.45 ? RationalComplexToVBExpr("12.34+56.78*#i") RealToComplex(12.34, 56.78) ? RationalComplexToVBExpr("45*#i") RealToComplex(0, 45) ? RationalComplexToVBExpr("12+45*#i") RealToComplex(12, 45) ? RationalComplexToVBExpr("-12-45*#i") RealToComplex(-12, -45) ? RationalComplexToVBExpr("23/45+67/89*#i") RealToComplex(23/45, 67/89)See also:
ComplexStringToReals Function InfixToBasic Function MathComplex Class MathTrigComplex ClassvExpr: String containing a numeric expression. Function returns Null if vExpr is Null or cannot be fixed up to a String. The string numeric expression must consist of a real part and/or a complex part. Each part (the real part and the complex part) must consist of either 1) a signed integer constant or 2) a signed rational expression of the form "A/B" where A and B are both integers. The complex part (if any) can be signed and it must be followed by "*#i" to signify that it is the complex part.
Special handling: If vExpr is "1/0" then this function will return "DivideByZero" which is a reference to the DivideByZero Property. If vExpr is "?" then this function will return "UnknownValue" because Derive uses the question mark to represent undefined values.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.