This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica Menu Item

Edit Check Balance

Check Balance
expands the selection to cover the nearest pair of matched bracketing characters.
  • Check Balance selects nested expressions (for example, parenthesized) outward from the insertion point.
  • To select a nested expression, select anywhere within the expression by clicking. Choose Check Balance, and click to expand the selection out to the next set of enclosed parentheses, brackets, or braces.
  • Each time you choose Check Balance, Mathematica expands the selection in both directions until it finds pairs of matching parentheses, brackets, or braces. Repeating the command expands the selection one level at a time.
  • You can use the Check Balance command to check the structure of mathematical expressions. For example, if you have unbalanced parentheses or parentheses incorrectly balanced with brackets or braces, Mathematica beeps. Choose HelpWhy the Beep? to identify the mistake. If you position the insertion point inside a bracketed expression and choose Check Balance, Mathematica should select the whole expression. If not, you have a missing bracket somewhere.
  • Mathematica cannot balance a selection that spans more than one cell.
  • Keyboard shortcuts: Shift+Ctrl+B (Windows); Shift+Cmd+B (Macintosh); Shift+Ctrl+B (X).