Author Topic: missing parenthesis  (Read 2888 times)

0 Members and 1 Guest are viewing this topic.

csgoh

  • Newt
  • Posts: 176
missing parenthesis
« on: March 12, 2010, 10:38:27 AM »
how to check for missing parenthesis in vlide?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: missing parenthesis
« Reply #1 on: March 12, 2010, 11:38:24 AM »
That's how a programmer earns his money, finding missing parenthesis.

I use the Ctrl+[ and Ctrl+] to ferret out the missing bad boy.
It can be tricky but with practice you get faster.

My method is to verify large chunks of code first. Finding which chunk the missing
paren is in.

Short example:
You have an IF statement that has 40 lines in the first (Progn and another 40 lines in the second (progn.
Place the cursor before paren on the (IF and press Ctrl+]
If the cursor jumps to the matching paren then no problem in that section. But if it jumps to the paren
for one of the progn's then you on to the source of the missing paren.

Code: [Select]
(if  <-------<<<  start with cursor in front of the (
  (progn
    <40 lines of code>
  )      <------<<<  if jump is here missing paren is withing the progn
  (progn
    <40 lines of code>
  )
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hmspe

  • Bull Frog
  • Posts: 362
Re: missing parenthesis
« Reply #2 on: March 12, 2010, 01:06:10 PM »
I use a rather ancient program that you can find with a google search for PARENMAT.EXE.  The copy at symtelnet is the correct one.  I did not verify the other two sites.  The utility works with any text and it color codes matching paren sets.  It is an external program but I find it a lot faster to use than what's in the IDE.
"Science is the belief in the ignorance of experts." - Richard Feynman

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: missing parenthesis
« Reply #3 on: March 12, 2010, 02:17:12 PM »
I double click outside the last parenthesis to highlight a block, and check that it is enclosing the correct statements  :-)

pmwhite

  • Guest
Re: missing parenthesis
« Reply #4 on: March 12, 2010, 04:13:10 PM »
I double click outside the last parenthesis to highlight a block, and check that it is enclosing the correct statements  :-)
Thats how i check parenthesis also

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: missing parenthesis
« Reply #5 on: March 12, 2010, 04:38:31 PM »
Double click too and Ctrl+Shift+E (with VLIDE default formatting style)
Speaking English as a French Frog

mkweaver

  • Bull Frog
  • Posts: 352
Re: missing parenthesis
« Reply #6 on: March 12, 2010, 07:27:09 PM »
Double-click outside the paren in question

csgoh

  • Newt
  • Posts: 176
Re: missing parenthesis
« Reply #7 on: March 13, 2010, 01:29:47 AM »
thanks, guys.