Author Topic: Simple question (indefinite points)  (Read 11627 times)

0 Members and 1 Guest are viewing this topic.

Notsober

  • Guest
Re: Simple question (indefinite points)
« Reply #60 on: October 24, 2008, 05:56:02 PM »
...and exactly what do you mean by "always localize this routine"?

I can't necessarily run this routine from my lap  :-)

lol. all my routines are in the support folder...

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Simple question (indefinite points)
« Reply #61 on: October 24, 2008, 06:02:06 PM »
He means to localize the error routine.

(defun c:Main (/ *error*)

(defun *error* (msg)
)

)

Above has the error routine localized.

(defun c:Main ()

(defun *error* (msg)
)

)

Above does Not have the error routine localized.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Notsober

  • Guest
Re: Simple question (indefinite points)
« Reply #62 on: October 24, 2008, 06:10:31 PM »
oh.. heh.





why won't this thread DIE already!? gah!

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Simple question (indefinite points)
« Reply #63 on: October 24, 2008, 11:51:59 PM »
oh.. heh.





why won't this thread DIE already!? gah!

CAB was trying to edumacate you and you brought up the question? :-P

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Simple question (indefinite points)
« Reply #64 on: October 25, 2008, 12:07:11 AM »
...and exactly what do you mean by "always localize this routine"?

I can't necessarily run this routine from my lap  :-)

lol. all my routines are in the support folder...
When you don't localize the error function it takes over for the built in lisp error handler and stays that way until you (setq *error* nil) or another error handler which is not localized steps on this one.

So it is good practice to clean up after yourself environmentally speaking.

Although that error handler should not cause any problems many error routines attempt to reset environmental variables with program variables that have been clobbered & therefor you get the dreaded message "An error occurred inside the error handler"

It's midnight so I hope I was clear. ZZZzzzzz....
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.

Notsober

  • Guest
Re: Simple question (indefinite points)
« Reply #65 on: October 25, 2008, 10:44:07 AM »
thanks for the more *detailed* explanation... it was clear.

but I did understand T.Willey's explanation too... so it's all good  8-)