<?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 Re: Lisp loop function not found in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7788144#M108550</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem here is that you have been reading something about Common Lisp . The LOOP macro exists there, but not in AutoLISP/Visual Lisp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While reading CL materials will probably teach you a better programming style than the stuff from Autodesk, there are large differences between the languages. Back when there used to be printed documentation, the part about AutoLISP was about 66 pages. A book about CL (CLtL2) has an index of 60 pages, the book is about a thousand pages...&lt;/P&gt;
&lt;P&gt;AutoLISP has 6 built-in datatypes, IIRC, CL has 17.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, the low-level list manipulation is the same, but most of the more powerful constructs in CL don't exist in AutoLISP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2018 10:19:28 GMT</pubDate>
    <dc:creator>martti.halminen</dc:creator>
    <dc:date>2018-02-19T10:19:28Z</dc:date>
    <item>
      <title>Lisp loop function not found</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786309#M108547</link>
      <description>&lt;P&gt;I am trying to make my first loop and for some reason this is not working:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(loop for x from 1 to 10 do&lt;BR /&gt;(prompt "ASDASD")&lt;BR /&gt;(terpri)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; error: no function definition: LOOP&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 00:11:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786309#M108547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-18T00:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp loop function not found</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786334#M108548</link>
      <description>&lt;PRE&gt;(setq count 1)
(While (&amp;lt; count 11)



(prompt (strcat "\n" (itoa count) "   asdas   "))

(setq count (1+ count))

)

;;;1   asdas
;;;2   asdas
;;;3   asdas
;;;4   asdas
;;;5   asdas
;;;6   asdas
;;;7   asdas
;;;8   asdas
;;;9   asdas
;;;10   asdas&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 01:07:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786334#M108548</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2018-02-18T01:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp loop function not found</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786341#M108549</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;BR /&gt;(loop for x from 1 to 10 do&lt;BR /&gt;(prompt "ASDASD")&lt;BR /&gt;(terpri)&lt;BR /&gt;)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;; error: no function definition: LOOP&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The error message says it all -- that's not an AutoLisp function.&amp;nbsp; In addition to the &lt;STRONG&gt;(while)&lt;/STRONG&gt; function already suggested, depending on the circumstances you could also use &lt;STRONG&gt;(repeat)&lt;/STRONG&gt;.&amp;nbsp; If you really want the same prompt ten times as your example suggests:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(repeat 10&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (prompt "ASDASD")&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 01:23:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7786341#M108549</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-02-18T01:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp loop function not found</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7788144#M108550</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem here is that you have been reading something about Common Lisp . The LOOP macro exists there, but not in AutoLISP/Visual Lisp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While reading CL materials will probably teach you a better programming style than the stuff from Autodesk, there are large differences between the languages. Back when there used to be printed documentation, the part about AutoLISP was about 66 pages. A book about CL (CLtL2) has an index of 60 pages, the book is about a thousand pages...&lt;/P&gt;
&lt;P&gt;AutoLISP has 6 built-in datatypes, IIRC, CL has 17.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, the low-level list manipulation is the same, but most of the more powerful constructs in CL don't exist in AutoLISP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 10:19:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-loop-function-not-found/m-p/7788144#M108550</guid>
      <dc:creator>martti.halminen</dc:creator>
      <dc:date>2018-02-19T10:19:28Z</dc:date>
    </item>
  </channel>
</rss>

