Author Topic: Parenthesis matching ... DUH!!!  (Read 5607 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Parenthesis matching ... DUH!!!
« on: June 29, 2006, 03:54:41 AM »
Code: [Select]
  ...........
(ACTION_TILE "nyloc" "(_calextra)")
(ACTION_TILE "mk_pick" "(progn(_getparams)(DONE_DIALOG 9))")
(ACTION_TILE "replaceblock" "(progn (SETQ bolt:replace T) (check_eval)")
(ACTION_TILE "eval_length" "(_evallen)")
(ACTION_TILE "accept" "(check_eval)")
(ACTION_TILE "cancel" "(DONE_DIALOG 0)")
.......

No prizes ...  but this had me chasing my tail for a while ...    :oops:
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Parenthesis matching ... DUH!!!
« Reply #1 on: June 29, 2006, 07:00:51 AM »
Code: [Select]
(ACTION_TILE "replaceblock" "(progn (SETQ bolt:replace T) (check_eval)")
my guess ....
TheSwamp.org  (serving the CAD community since 2003)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Parenthesis matching ... DUH!!!
« Reply #2 on: June 29, 2006, 08:00:29 AM »
yep, and damn difficult to find.  ... locks up the routine, and ACAD, dead .. with no error message ..   
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Parenthesis matching ... DUH!!!
« Reply #3 on: June 29, 2006, 08:05:48 AM »
yep, and damn difficult to find.  ... locks up the routine, and ACAD, dead .. with no error message ..   
:-)
Code: [Select]
(ACTION_TILE "nyloc" (VL-PRIN1-TO-STRING '(_calextra)))
(ACTION_TILE "mk_pick" (VL-PRIN1-TO-STRING '(progn(_getparams)(DONE_DIALOG 9))))
(ACTION_TILE "replaceblock" (VL-PRIN1-TO-STRING '(progn (SETQ bolt:replace T) (check_eval))))
(ACTION_TILE "eval_length" (VL-PRIN1-TO-STRING '(_evallen)))
(ACTION_TILE "accept" (VL-PRIN1-TO-STRING '(check_eval)))
(ACTION_TILE "cancel" (VL-PRIN1-TO-STRING '(DONE_DIALOG 0)))

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Parenthesis matching ... DUH!!!
« Reply #4 on: June 29, 2006, 08:17:36 AM »
I cheated! :-)
TheSwamp.org  (serving the CAD community since 2003)

delium55

  • Guest
Re: Parenthesis matching ... DUH!!!
« Reply #5 on: June 29, 2006, 09:20:08 AM »
Bonjour Mark,

Just a simple question; how do you check the extra paranthesis with VIM.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Parenthesis matching ... DUH!!!
« Reply #6 on: June 29, 2006, 09:33:47 AM »
If the question comes up it's <Ctrl> <M> in Textpad.

Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Parenthesis matching ... DUH!!!
« Reply #7 on: June 29, 2006, 10:01:52 AM »
Bonjour Mark,

Just a simple question; how do you check the extra paranthesis with VIM.

In that particular instance I simply placed the cursor on each beginning paren, Vim 7 highlights the opening, closing parens by default.
TheSwamp.org  (serving the CAD community since 2003)

Joe Burke

  • Guest
Re: Parenthesis matching ... DUH!!!
« Reply #8 on: June 29, 2006, 11:47:21 AM »
If the question comes up it's <Ctrl> <M> in Textpad.



Michael,

I wish TextPad was smart enough to ignore commented out lines while checking parens with Ctrl M.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Parenthesis matching ... DUH!!!
« Reply #9 on: June 29, 2006, 12:30:58 PM »
Also in UltraEdit placing the cursor causes the matching paren to highlight.
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.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Parenthesis matching ... DUH!!!
« Reply #10 on: June 29, 2006, 03:00:52 PM »
Michael,

I wish TextPad was smart enough to ignore commented out lines while checking parens with Ctrl M.

That's a good idea (as an toggled option) Joe, I'll pass that on to the Helios folks when I get a chance. Thanks.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: Parenthesis matching ... DUH!!!
« Reply #11 on: June 29, 2006, 10:03:00 PM »
when use Pspad, type the left Parenthesis, the right Parenthesis automatic generate, when point to the left Parenthesis, it automatic found the Parenthesis.

Lisplink use ctrl+M to find the matching. and its ctrl+A is very useful for me.

Fig.1 Pspad, Fig.2 Lisplink
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Parenthesis matching ... DUH!!!
« Reply #12 on: June 30, 2006, 06:24:27 PM »
Thanks guys,

It wasn't so much the capability of checking matching paren's  line by line ..

.. more the fact that we have to know where to look.

Because AutoCAD freezes when it tries to evaluate the callback, any debugging and animation/tracing is suspended as well .. so I thought the problem was in the (check_eval) function ; but only under certain conditions 'cause it is called from other locations as well.
Resolved the location by using debug:print statements. .. just tedious !

Sort of an anticlimax to discover the cause, I tell you.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: Parenthesis matching ... DUH!!!
« Reply #13 on: June 30, 2006, 06:28:32 PM »
It's allways something simple :D
I know just how you feel, I had a lot of these moments lately!
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Parenthesis matching ... DUH!!!
« Reply #14 on: July 04, 2006, 12:00:55 AM »
now if you talk about lisp editor...
 
I use this....

http://www.studioware.com/
Keep smile...