Signature (Visual Basic / VBA)
Public Function InfixToPostfixInStackPriority( _
ByVal vToken As Variant _
) As Variant
Code Examples
InfixToPostfixInStackPriority("SIN") = 6
InfixToPostfixInStackPriority("*") = 3
InfixToPostfixInStackPriority("(") = 0
IsNull(InfixToPostfixInStackPriority("XCOORD")) = True ' #4
IsNull(InfixToPostfixInStackPriority("%")) = True ' #5
ABS, ASIN, ATAN, COS, LN, SIGN, SIN, SQRT, TAN
^
*, /
\, MOD
+, -
(
Parameters
| Parameter | Description |
|---|---|
| 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). |
Notes & Version History
| Summary | This function is used by the InfixToPostfix function to help it determine whether to "shift" or "reduce" while parsing the infix-format expression. |
| Note | This function recognizes the following operators and functions (listed from highest precedence to lowest): 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. |