From: Florian P. Lamprecht
Subject: please help to making a lisp running !!
Date: 
Message-ID: <47st07$35u@dm2.uibk.ac.at>
please help,

if i load this lisp i get the message: exceed maximum string lengths
where is the mistake ??

thanks f.l.

___________________________________________________________________

(defun c:wi()(c:winkel))
(princ "\nC:Winkel.lsp loaded - start with WI or Winkel ")

(defun eingabe_wi ()               ;teilprogramm eingabe
(setq v_art " ")
  (while (/=v_art "line")
    (setq v_o1    (entsel "\n1. line:    ")
          name_o1 (car v_o1)
          v_art   (cdr (assoc 0 (entget name_o1)))
    )
    (if (/=v_art "line")
      (princ " objekt ist keine linie: ")
    )
)
  (setq p1 (osnap (cadr v_o1) "near"))
  (redraw name_o1 3)
  (setq p11 (cdr (assoc 10 (entget name_o1)))
        p12 (cdr (assoc 11 (entget name_o1)))
  )
  (princ p11)
  (princ p12)

  (setq v_art " ")
  (while (/=v_art "line")
    (setq v_o2    (entsel "\n2. line:    ")
          name_o2 (car v_o2)
          v_art   (cdr (assoc 0 (entget name_o2)))
    )
    (if (/=v_art "line")
      (princ " objekt ist keine linie: ")
    )
)

  (setq p2 (osnap (cadr v_o2) "near"))
  (redraw name_o2 3)
  (setq p11 (cdr (assoc 10 (entget name_o2)))
        p12 (cdr (assoc 11 (entget name_o2)))
  )
  (princ p21)
  (princ p22)
  (setq ps (inters p11 p12 p21 p22 nil))
)

(defun bia(n_wi)              ;teilprogramm bogen in altgrad
  (* n_wi (/ 180 pi))
)

(defun berechnung_wi()             ;teilprogramm winkel-berechnung
  (setq winkel1 (angle ps p1)
        winkel2 (angle ps p2)
        winkel (- winkel2 winkel1)
  )
  (if  (" winkel 0) (setq winkel (+ winkel pi pi)))
)

(defun ausgabe_wi()           ;teilprogramm ausgabe
  (princ "\nAnstieg des 1. Schenkels: ")
  (princ (bia winkel1))
  (princ "� Anstieg des 2. Schenkels: ")
  (princ (bia winkel2))
  (princ "�")
  (princ "\nWinkel: ")
  (setq wi (bia winkel))
  (princ wi)
  (princ "� (")
  (princ winkel)
  (princ " im Bogenma�)")
)

(defun c:winkel ( / c_cmdecho c_color c_osmode v_art
              v_o1 v_o2 name_o1 name_o2 p1 p11
              p12 p2 p21 p22 n_wi ps winkel1
              winkel2 winkel)    ;hauptprogramm WINKEL
  (setq olderr *error*
     *error* myerr
     c_cmdecho (getvar "cmdecho")
     c_color   (getvar "cecolor")
     c_osmode  (getvar "osmode")
  )
  (setvar "cmdecho" 0)
  (Eingabe_wi)
  (if (not ps)
    (princ "\nLinien haben keinen gemeinsamen Schnittpunkt! ")
    (progn
      (princ "\nSchnittpunkt: ")
      (princ ps)
      (Berechnung_wi)
      (Ausgabe_wi)
    )
  )
  (setq v_leer (getstring "    Weiter mit Enter! "))
  (redraw name_o1 1)
  (redraw name_o2 1)
  (command "color" c_color)
  (setvar "osmode" c_osmode)
  (setvar "cmdecho" c_cmdecho)
  (setq *error* olderr)
  (princ)
 )

;;; 
--------------------------------------------------------------------------;

From: Simon Leinen
Subject: Re: please help to making a lisp running !!
Date: 
Message-ID: <rscviotaemb.fsf@liasg6.epfl.ch>
I know AutoCAD's Lisp programming environment can be frustrating, but
how much time have you spent looking for the bug in your program
before posting it to the News?

Get a syntax-highlighting editor (such as a recent version of GNU
Emacs) and you will find the bug immediately.
-- 
Simon.					http://liawww.epfl.ch/~simon/
"Give a hungry man a fish, and he can eat once.
 Give him the picture of a fish, and he can look at it for all of his life."
(or something like that)
(Le Chat)
From: Simon Leinen
Subject: Re: please help to making a lisp running !!
Date: 
Message-ID: <rscu44daelk.fsf@liasg6.epfl.ch>
I know AutoCAD's Lisp programming environment can be frustrating, but
how much time have you spent looking for the bug in your program
before posting it to the News?

Get a syntax-highlighting editor (such as a recent version of GNU
Emacs) and you will find the bug immediately.
-- 
Simon.					http://liawww.epfl.ch/~simon/
"Give a hungry man a fish, and he can eat once.
 Give him the picture of a fish, and he can look at it for all of his life."
(or something like that)
(Le Chat)
From: Michael R. Blair
Subject: Re: please help to making a lisp running !!
Date: 
Message-ID: <ZIGGY.95Nov10061517@rolex.ai.mit.edu>
In article <··········@dm2.uibk.ac.at> ···················@uibk.ac.at (Florian P. Lamprecht) writes:

   From: ···················@uibk.ac.at (Florian P. Lamprecht)
   Newsgroups: comp.lang.lisp
   Date: 9 Nov 1995 12:42:47 GMT
   Organization: University of Innsbruck, Austria

   please help,

   if i load this lisp i get the message: exceed maximum string lengths
   where is the mistake ??

   thanks f.l.

   ___________________________________________________________________

   (defun berechnung_wi()             ;teilprogramm winkel-berechnung
     (setq winkel1 (angle ps p1)
	   winkel2 (angle ps p2)
	   winkel (- winkel2 winkel1)
     )
     (if  (" winkel 0) (setq winkel (+ winkel pi pi)))
   )
           ^
           |
           `---------  Herr buggen ist hir ;-)
   ;;; 
   --------------------------------------------------------------------------;
-- 
------------------------------------------------------------------------------
  Michael R. Blair   --.    ·····@ai.mit.edu | MIT Artificial Intelligence Lab
   (617) 253-0765      \\    ···@lcs.mit.edu | MIT Labor. for Computer Science
,,Lambda Calculus...   /\\_ ...uber alles!'' | 545 Technology Square--Room 439
http://www-swiss.ai.mit.edu/~ziggy/ziggy.html| Cambridge,  MA USA   02139-3594