Author Topic: sub routine help  (Read 5378 times)

0 Members and 1 Guest are viewing this topic.

JB

  • Guest
sub routine help
« on: January 22, 2004, 05:05:30 PM »
Hello !
I am new to the list. I have some experience with lisp, but very limited.
I have written a lisp routine to draw open web frames. It keeps givivng me a message that I do not understand. It is " #<SUBR @01fd730c PRINC>".
What is it ?
If anyone would be interested in seeing the code I could send it to you directly. It is VERY basic, but long and very important to me.
Thanks in advance!
Jamie:-)

daron

  • Guest
sub routine help
« Reply #1 on: January 22, 2004, 05:17:38 PM »
It might be important to see the code, but it appears that the return value is a subroutine.

JB

  • Guest
Thank You
« Reply #2 on: January 22, 2004, 05:30:26 PM »
Yes !
But where do I find out about it. I did not write any sub routines into the code.
It is simple "keystroke" programing.
Any Ideas.
Thanks!
Jamie:-)

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
sub routine help
« Reply #3 on: January 22, 2004, 05:36:48 PM »
I dont get what your talking about when you say 'Keystroke' programing. (Are you talking about a macro, or a script?)

If you try to evaluate a existing autolisp function you will get a return like that. - e.g. (eval princ) will return something like that. ...?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

daron

  • Guest
sub routine help
« Reply #4 on: January 22, 2004, 05:48:00 PM »
The code you wrote seems to BE a subroutine. That's its return value, right?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
sub routine help
« Reply #5 on: January 22, 2004, 05:59:08 PM »
Did you happen to type  PRINC  at the Visual Lisp IDE Console ??


if so : it must be  (princ)
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.

daron

  • Guest
sub routine help
« Reply #6 on: January 22, 2004, 06:00:38 PM »
Why don't you post the code?

JB

  • Guest
sub routine help
« Reply #7 on: January 22, 2004, 06:02:42 PM »
I did end the program with "princ" !
Do you think that created the sub-routine?
Jamie:-)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
sub routine help
« Reply #8 on: January 22, 2004, 06:06:40 PM »
Not likely, unless you have it being returned by some function. We could tell more if we could see the code though.
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
sub routine help
« Reply #9 on: January 22, 2004, 07:07:39 PM »
Ok, the answer should be something pretty benign, I am suspecting that you indeed did use princ as the last thing in your routine. If I was a betting man, I would bet that what you have done is not enclose the princ command in parenthesis.. like so...
Code: [Select]

(defun C:yourprogram()
 (enter your code here)
 (etc etc)
 (etc etc)
 princ
)


This will always return the internal subroutine for princ on the command line. It should look like this:
Code: [Select]

(defun C:yourprogram()
 (enter your code here)
 (etc etc)
 (etc etc)
 (princ)
)


So, do I win the prize ????
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JB

  • Guest
sub routine help
« Reply #10 on: January 23, 2004, 09:48:51 AM »
You do win the prize! When I have finished with some clean up work, You are on the list to see the finished project.
It did indeed stop the sub routine message. It got me much further down the road.
I appreciate everyone's help.
I will keep posting and reading this board.
Thank You !
Jamie:-)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
sub routine help
« Reply #11 on: January 23, 2004, 10:50:34 AM »
you know, we aren't a bunch of ogres, 'ceptin for maybe dent but I think it is cause he had rabies as a child ... If it is something good, you really should share the code with everyone.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie