TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: csgoh on March 12, 2010, 10:38:27 AM

Title: missing parenthesis
Post by: csgoh on March 12, 2010, 10:38:27 AM
how to check for missing parenthesis in vlide?
Title: Re: missing parenthesis
Post by: CAB 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>
  )
)
Title: Re: missing parenthesis
Post by: hmspe 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.
Title: Re: missing parenthesis
Post by: Lee Mac 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  :-)
Title: Re: missing parenthesis
Post by: pmwhite 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
Title: Re: missing parenthesis
Post by: gile on March 12, 2010, 04:38:31 PM
Double click too and Ctrl+Shift+E (with VLIDE default formatting style)
Title: Re: missing parenthesis
Post by: mkweaver on March 12, 2010, 07:27:09 PM
Double-click outside the paren in question
Title: Re: missing parenthesis
Post by: csgoh on March 13, 2010, 01:29:47 AM
thanks, guys.