<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Lisp Learning syntax error in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500396#M39367</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following runs errorly&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun c:xx ( / )&lt;BR /&gt;(Setq p0 nil)&lt;BR /&gt;(if (setq pt (getpoint "\nSpecify point: "))&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 0)&lt;BR /&gt;if( (or (= i1 0) (/= ptHt p0) )&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 1)&lt;BR /&gt;(setq p0 ptHt)&lt;BR /&gt;(princ 1)&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(princ 2)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(setq i2 0)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it i get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Command: xx&lt;BR /&gt;Specify point: 12; error: no function definition: nil&lt;BR /&gt;Command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe is something simple&lt;/P&gt;&lt;P&gt;I think i have a large road to catch lisp knowledge&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;</description>
    <pubDate>Sat, 22 Oct 2022 00:02:55 GMT</pubDate>
    <dc:creator>GeryKnee</dc:creator>
    <dc:date>2022-10-22T00:02:55Z</dc:date>
    <item>
      <title>Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500396#M39367</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following runs errorly&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun c:xx ( / )&lt;BR /&gt;(Setq p0 nil)&lt;BR /&gt;(if (setq pt (getpoint "\nSpecify point: "))&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 0)&lt;BR /&gt;if( (or (= i1 0) (/= ptHt p0) )&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 1)&lt;BR /&gt;(setq p0 ptHt)&lt;BR /&gt;(princ 1)&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(princ 2)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(setq i2 0)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it i get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Command: xx&lt;BR /&gt;Specify point: 12; error: no function definition: nil&lt;BR /&gt;Command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe is something simple&lt;/P&gt;&lt;P&gt;I think i have a large road to catch lisp knowledge&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 00:02:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500396#M39367</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-10-22T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500415#M39368</link>
      <description>&lt;P&gt;I believe its this line here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;if( (or (= i1 0) (/= ptHt p0) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should fix it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:xx ( / )
(Setq p0 nil)
(if (setq pt (getpoint "\nSpecify point: "))
(Progn ;;true
(setq i1 0)
(if (or (= i1 0) (/= ptHt p0) )
(Progn ;;true
(setq i1 1)
(setq p0 ptHt)
(princ 1)
);;Progn true
(Progn ;;false
(princ 2)
);;Progn false
);;if
);;Progn true
(Progn ;;false
(setq i2 0)
);;Progn false
);;if
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And again, all I did was correct the typos on the one line to read:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(if (or (= i1 0) (/= ptHt p0) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 00:22:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500415#M39368</guid>
      <dc:creator>annoisscary</dc:creator>
      <dc:date>2022-10-22T00:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500421#M39369</link>
      <description>&lt;P&gt;Sorry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ptHt is Pt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun c:x2 ( / )&lt;BR /&gt;(Setq p0 nil)&lt;BR /&gt;(if (setq pt (getpoint "\nSpecify point: "))&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 0)&lt;BR /&gt;if( (or (= i1 0) (/= pt p0) )&lt;BR /&gt;(Progn ;;true&lt;BR /&gt;(setq i1 1)&lt;BR /&gt;(setq p0 pt)&lt;BR /&gt;(princ 1)&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(princ 2)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;);;Progn true&lt;BR /&gt;(Progn ;;false&lt;BR /&gt;(setq i2 0)&lt;BR /&gt;);;Progn false&lt;BR /&gt;);;if&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 00:29:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500421#M39369</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-10-22T00:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500432#M39370</link>
      <description>&lt;P&gt;Again, same typo. its this line,&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;if( (or (= i1 0) (/= pt p0) )

;Needs to be,
(if(or(= i1 0)(/= pt p0))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 00:45:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500432#M39370</guid>
      <dc:creator>annoisscary</dc:creator>
      <dc:date>2022-10-22T00:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500552#M39371</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's worth the try, soon you will surely be coding better. Nested Ifa can get a bit confusing.&lt;/P&gt;&lt;P&gt;Although it is not very clear what you are trying to do, but I have tried to interpret your code a bit and verify that there are some lines that are not going to be executed. Because your first conditional will always be true, and the result will be equal to 1&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:x2 (/ )
  (Setq p0 nil)
  (if (setq pt (getpoint "\nSpecify point: "));;;here you must enter a condition that evaluates: true false
    (Progn ;;true
           (setq i1 0)
;;;if( (or (= i1 0) (/= pt p0) );;a parenthesis is missing here
           (if (or (= i1 0) (/= pt p0)) ;;This condition will always be true, therefore the other lines will not be evaluated.
             (Progn ;;true
                    (setq i1 1)
                    (setq p0 pt)
                    (princ 1)
             )
             ;;Progn true
;;;-----------------------------will never be evaluated
             (Progn ;;false
                    (princ 2)
             ) ;;Progn false
           );;if
;;;-----------------------------will never be evaluated
    );;End Progn true
    (Progn ;;false
           (setq i2 0)
    );;Progn false
  );;if
;;;-----------------------------will never be evaluated
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 03:18:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500552#M39371</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2022-10-22T03:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500949#M39372</link>
      <description>&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Thank You Sir&lt;/P&gt;&lt;P class="lia-align-left"&gt;I saw that the prpblem was that i started a code&amp;nbsp;προταση without using "(&amp;nbsp;&lt;SPAN&gt;" on start.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;That's because i write codes in pascal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;I found an online list compiler :&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;&lt;A href="https://www.tutorialspoint.com/execute_lisp_online.php" target="_blank"&gt;https://www.tutorialspoint.com/execute_lisp_online.php&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;but i wasn't able to use it&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;Maybe i must try again to do it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;Gery&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 11:59:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11500949#M39372</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-10-22T11:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11501075#M39373</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To code interactively, you have the visual lisp editor and as of 2021, VSCode&lt;/P&gt;&lt;P&gt;Here you have information&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/es/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2021/ESP/AutoCAD-Core/files/GUID-5601ACC6-C4F6-4375-9C2C-3DBCAE2880B1-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/es/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2021/ESP/AutoCAD-Core/files/GUID-5601ACC6-C4F6-4375-9C2C-3DBCAE2880B1-htm.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2022 14:21:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11501075#M39373</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2022-10-22T14:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Learning syntax error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11501816#M39374</link>
      <description>&lt;P&gt;Notepad++ has a run code from current file, did use it all the time and as I have said before has bracket checking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I write most code not spaced but i think for you may be worthwhile to make it easier to see where stuff starts and finishes. This is notepad++ note the red brackets doing auto checking. Just put mouse on bracket and opposite end will be shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1666500323443.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1130850iD006B7BC05BAAE78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1666500323443.png" alt="SeaHaven_0-1666500323443.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 04:46:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-learning-syntax-error/m-p/11501816#M39374</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-10-23T04:46:42Z</dc:date>
    </item>
  </channel>
</rss>

