Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer
 Mr.Haki's JBuilder Jar #55
See Also: JBuilder Papers

Find the bracket!

  if (s.equals("Something")) {
    //
    // Here comes the code...
    //
  } else if (s.equals(s.substring(s.indexOf("Search")))) {
    //
    // Here comes the code...
    //
  }
A simple piece of code. Maybe the second if-statement looks a bit more complicated, especially the number of parentheses. Well OK, it isn't that complicated, but it will demonstrate my tip.
Suppose we forget if we have included enough parentheses? We can simply look for the corresponding parenthesis by placing the cursor before the opening paranthesis and type Alt-]. The cursor will jump to the closing parenthesis (if JBuilder can find one).
We can also place the cursor before the closing parenthesis and type Alt-[ to go the corresponding opening parenthesis.

The same commands can be used for curly brackets.


This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.