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

Infix To Postfix In Stack Priority Function
Math Symbolic Class

Public Function InfixToPostfixInStackPriority( _
    ByVal vToken As Variant _
    ) As Variant

Infix to Postfix Translator "In-Stack Priority"
Return the in-stack priority of a mathematical operator or function call.

Summary: This function is used by the InfixToPostfix function to help it determine whether to "shift" or "reduce" while parsing the infix-format expression.
Examples:
    InfixToPostfixInStackPriority("SIN") = 6
    InfixToPostfixInStackPriority("*") = 3
    InfixToPostfixInStackPriority("(") = 0
    IsNull(InfixToPostfixInStackPriority("XCOORD")) = True ' #4
    IsNull(InfixToPostfixInStackPriority("%")) = True ' #5
See also:
    InfixToPostfixInComingPriority Function
    InfixToPostfix Function
Note: This function recognizes the following operators and functions (listed from highest precedence to lowest):
    ABS, ASIN, ATAN, COS, LN, SIGN, SIN, SQRT, TAN
    ^
    *, /
    \, MOD
    +, -
    (
The functions at the top of this list have the highest precedence and the open parentheses character has the lowest precedence (and functions/operators on the same line have the same precedence). This function assumes that all other alphanumeric words represent variables or numeric constants.
Note: Although this function recognizes "-" to mean subtraction, it does not support the use of "-" as a unary minus operator.

vToken: String containing a single algebraic operator or function name for which the in-stack priority will be returned. Function returns Null if vToken is Null or cannot be fixed up to a String.

Function returns Null if vToken is not one of the recognized operators or function names listed above (as in examples #4 and #5).

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