<-- Previous || Up || Next -->

Break Parentheses Function
Math Symbolic Class

Public Function BreakParentheses( _
      ByVal vExpr As Variant _
    , Optional ByVal vSeparator As Variant _
    ) As Variant

"Separate First-level Parenthesized Sub-expressions"
Adds a string separator (like vbCrLf) after closing first-level parentheses within algebraic (infix) expressions.

    ? BreakParentheses("((A-B)*C)^(D-E)*(F+G)")
    ? BreakParentheses("((2*X)+A)*(R+4)")
See also:
    InfixToBasic Function
    VBNameToDeriveName Function
    RationalComplexToVBExpr Function
vExpr: The algebraic expression which will have its parenthesized sub-expressions separated within the result string. Function returns Null if vExpr is Null or cannot be fixed up to a String.
Note: This function uses the IsAlNum function to determine is characters are alphanumeric.

vSeparator: The string that will separate the sub-expressions within the result string. vSeparator defaults to vbCrLf (carriage return, new line characters) if it is missing or Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.