<?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: Program Style in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812920#M161246</link>
    <description>When programming I have a certain style I follow, not so much for&lt;BR /&gt;
memory reasons, but for clarity.  I keep readin warnings against using&lt;BR /&gt;
my style and would like to know why it is bad form.&lt;BR /&gt;
&lt;BR /&gt;
Here is the general form I use:&lt;BR /&gt;
&lt;BR /&gt;
(defun c:func_name ( / func_main func1 func2 func3)&lt;BR /&gt;
  (defun func_main ( / )&lt;BR /&gt;
    (do_something)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func1 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func2 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func3 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (func_main)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
This style has always worked and continues to work well for me.  The&lt;BR /&gt;
only problem is VLisp keeps warning me not to do it.&lt;BR /&gt;
&lt;BR /&gt;
I don' know if it's related, but I also have programs that will not&lt;BR /&gt;
run when VLisp is loaded.  They run fine when it's not loaded.&lt;BR /&gt;
&lt;BR /&gt;
When doing an animated walkthrough on my programs VLisp will tell me&lt;BR /&gt;
I'm crashing in spots that aren't even close to where the problem&lt;BR /&gt;
really is.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Have fun,&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;BR /&gt;
Seibertron Engineered Systems&lt;BR /&gt;
A Virtual company&lt;BR /&gt;
Virtually a company...&lt;BR /&gt;
I can dream can't I!</description>
    <pubDate>Fri, 14 Jan 2000 12:30:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-01-14T12:30:05Z</dc:date>
    <item>
      <title>Program Style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812919#M161245</link>
      <description>I use that style all the time when doing dialog boxes, so I can use the &lt;BR /&gt;
same names for callback functions in different routines without &lt;BR /&gt;
interference.  It does tend to lead to long piles of code inside the &lt;BR /&gt;
main routine.  I believe VL is just warning you in case you've forgotten &lt;BR /&gt;
that the function name is a local variable.  I believe that using that &lt;BR /&gt;
style does no harm.&lt;BR /&gt;
&lt;BR /&gt;
I also think it has nothing to do with your other problems, but I have &lt;BR /&gt;
no idea what's causing your other problems.&lt;BR /&gt;
&lt;BR /&gt;
jrf&lt;BR /&gt;
Member of the Autodesk Discussion Forum Moderator Program&lt;BR /&gt;
&lt;BR /&gt;
In article &amp;lt;387f149b.56973875@adesknews.autodesk.com&amp;gt;, Dave Seibert &lt;BR /&gt;
wrote:&lt;BR /&gt;
&amp;gt; When programming I have a certain style I follow, not so much for&lt;BR /&gt;
&amp;gt; memory reasons, but for clarity.  I keep readin warnings against using&lt;BR /&gt;
&amp;gt; my style and would like to know why it is bad form.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Here is the general form I use:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; (defun c:func_name ( / func_main func1 func2 func3)&lt;BR /&gt;
&amp;gt;   (defun func_main ( / )&lt;BR /&gt;
&amp;gt;     (do_something)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func1 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func2 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func3 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (func_main)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; This style has always worked and continues to work well for me.  The&lt;BR /&gt;
&amp;gt; only problem is VLisp keeps warning me not to do it.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I don' know if it's related, but I also have programs that will not&lt;BR /&gt;
&amp;gt; run when VLisp is loaded.  They run fine when it's not loaded.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; When doing an animated walkthrough on my programs VLisp will tell me&lt;BR /&gt;
&amp;gt; I'm crashing in spots that aren't even close to where the problem&lt;BR /&gt;
&amp;gt; really is.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Any help would be appreciated.&lt;BR /&gt;
&amp;gt;</description>
      <pubDate>Fri, 14 Jan 2000 12:12:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812919#M161245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-14T12:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Program Style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812920#M161246</link>
      <description>When programming I have a certain style I follow, not so much for&lt;BR /&gt;
memory reasons, but for clarity.  I keep readin warnings against using&lt;BR /&gt;
my style and would like to know why it is bad form.&lt;BR /&gt;
&lt;BR /&gt;
Here is the general form I use:&lt;BR /&gt;
&lt;BR /&gt;
(defun c:func_name ( / func_main func1 func2 func3)&lt;BR /&gt;
  (defun func_main ( / )&lt;BR /&gt;
    (do_something)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func1 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func2 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (defun func3 ( / )&lt;BR /&gt;
    (do_something_else)&lt;BR /&gt;
  )&lt;BR /&gt;
  (func_main)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
This style has always worked and continues to work well for me.  The&lt;BR /&gt;
only problem is VLisp keeps warning me not to do it.&lt;BR /&gt;
&lt;BR /&gt;
I don' know if it's related, but I also have programs that will not&lt;BR /&gt;
run when VLisp is loaded.  They run fine when it's not loaded.&lt;BR /&gt;
&lt;BR /&gt;
When doing an animated walkthrough on my programs VLisp will tell me&lt;BR /&gt;
I'm crashing in spots that aren't even close to where the problem&lt;BR /&gt;
really is.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Have fun,&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;BR /&gt;
Seibertron Engineered Systems&lt;BR /&gt;
A Virtual company&lt;BR /&gt;
Virtually a company...&lt;BR /&gt;
I can dream can't I!</description>
      <pubDate>Fri, 14 Jan 2000 12:30:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812920#M161246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-14T12:30:05Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812921#M161247</link>
      <description>I nest my defuns quite often too.  The one twist you are doing that I&lt;BR /&gt;
haven't tried is to defun the main as well.  I tend to have the main part of&lt;BR /&gt;
the function (your func_main) as code following the last nested defun.&lt;BR /&gt;
&lt;BR /&gt;
If it helps you with your code, keep it up.&lt;BR /&gt;
&lt;BR /&gt;
==============================&lt;BR /&gt;
Michael Weaver&lt;BR /&gt;
By day: Charles Bettisworth &amp;amp; Co.&lt;BR /&gt;
     mweaver@bettisworth.com&lt;BR /&gt;
By night: AlasCAD&lt;BR /&gt;
   alascad@go.com&lt;BR /&gt;
AOL Instant messenger screen name:&lt;BR /&gt;
   AlasCAD&lt;BR /&gt;
AUGI #w2170&lt;BR /&gt;
==============================&lt;BR /&gt;
&lt;BR /&gt;
"Dave Seibert" &lt;SEIBERTRON&gt; wrote in message&lt;BR /&gt;
news:387f149b.56973875@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; When programming I have a certain style I follow, not so much for&lt;BR /&gt;
&amp;gt; memory reasons, but for clarity.  I keep readin warnings against using&lt;BR /&gt;
&amp;gt; my style and would like to know why it is bad form.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Here is the general form I use:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun c:func_name ( / func_main func1 func2 func3)&lt;BR /&gt;
&amp;gt;   (defun func_main ( / )&lt;BR /&gt;
&amp;gt;     (do_something)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func1 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func2 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func3 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (func_main)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; This style has always worked and continues to work well for me.  The&lt;BR /&gt;
&amp;gt; only problem is VLisp keeps warning me not to do it.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I don' know if it's related, but I also have programs that will not&lt;BR /&gt;
&amp;gt; run when VLisp is loaded.  They run fine when it's not loaded.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; When doing an animated walkthrough on my programs VLisp will tell me&lt;BR /&gt;
&amp;gt; I'm crashing in spots that aren't even close to where the problem&lt;BR /&gt;
&amp;gt; really is.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Any help would be appreciated.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Have fun,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Dave&lt;BR /&gt;
&amp;gt; Seibertron Engineered Systems&lt;BR /&gt;
&amp;gt; A Virtual company&lt;BR /&gt;
&amp;gt; Virtually a company...&lt;BR /&gt;
&amp;gt; I can dream can't I!&lt;/SEIBERTRON&gt;</description>
      <pubDate>Fri, 14 Jan 2000 20:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812921#M161247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-14T20:00:31Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812922#M161248</link>
      <description>Here is a quote from the Visual LISP help file:&lt;BR /&gt;
&lt;BR /&gt;
"Note If you check the entire GpDraw.lsp file, you&amp;#146;ll notice two additional&lt;BR /&gt;
warning messages:&lt;BR /&gt;
  ; *** WARNING: local variable used as function: OBJECTCREATIONFUNCTION&lt;BR /&gt;
  ; *** WARNING: local variable used as function: OBJECTCREATIONFUNCTION&lt;BR /&gt;
...&lt;BR /&gt;
The code will work &amp;#150; it is just Visual LISP&amp;#146;s way of letting you know that&lt;BR /&gt;
you&amp;#146;re either doing something very clever, or very dangerous.  In this case,&lt;BR /&gt;
it is clever."&lt;BR /&gt;
&lt;BR /&gt;
So, if it's clever rather than dangerous, go for it.</description>
      <pubDate>Fri, 14 Jan 2000 21:41:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812922#M161248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-14T21:41:09Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812923#M161249</link>
      <description>I've also had programs that won't run in VLisp.  In my case, the reason was&lt;BR /&gt;
that my program was calling functions that were defined by the acad.lsp&lt;BR /&gt;
file, and this was being automatically loaded in native AutoLISP, but not in&lt;BR /&gt;
VLisp.  I solved this problem with this line:&lt;BR /&gt;
&lt;BR /&gt;
(if vl-vbaload (load "acad")).&lt;BR /&gt;
&lt;BR /&gt;
Another reason this has  happened to me was that my AutoLISP program runs a&lt;BR /&gt;
script file that doesn't work well with Visual LISP.</description>
      <pubDate>Fri, 14 Jan 2000 21:50:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812923#M161249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-14T21:50:43Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812924#M161250</link>
      <description>Dave Seibert &lt;SEIBERTRON&gt; wrote:&lt;BR /&gt;
&amp;gt; When programming I have a certain style I follow, not so much for&lt;BR /&gt;
&amp;gt; memory reasons, but for clarity.  I keep readin warnings against using&lt;BR /&gt;
&amp;gt; my style and would like to know why it is bad form.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Here is the general form I use:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; (defun c:func_name ( / func_main func1 func2 func3)&lt;BR /&gt;
&amp;gt;   (defun func_main ( / )&lt;BR /&gt;
&amp;gt;     (do_something)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&lt;BR /&gt;
"local variable used as function" says that you assigned a function to a&lt;BR /&gt;
local variable.&lt;BR /&gt;
you can get rid of that warning by either:&lt;BR /&gt;
&lt;BR /&gt;
- use (defun c:func_name () ie omit the funcs from the local param list, or&lt;BR /&gt;
- make your local funcs global to allow efficient linking&lt;BR /&gt;
&lt;BR /&gt;
the problem is that VLISP currently doesn't parse function definitions for&lt;BR /&gt;
nested functions at run-time, only at compile- or check-time and gives you&lt;BR /&gt;
this warning. (BTW: ACOMP did that. but ACOMP was for experienced users and&lt;BR /&gt;
optional)&lt;BR /&gt;
the warning is okay, because when you call your function the functions are&lt;BR /&gt;
redefined again every time you call the function, &lt;BR /&gt;
so you need not declare them as local.&lt;BR /&gt;
&lt;BR /&gt;
functions are special objects now which are compiled. with your syntax you&lt;BR /&gt;
make a local copy of the name, set it to nil and redefine it.&lt;BR /&gt;
simple redefinition alone is sufficient.&lt;BR /&gt;
with old autolisp this was exactly the same (but without warning)&lt;BR /&gt;
&lt;BR /&gt;
the real problem is that autolisp is still too dynamic.&lt;BR /&gt;
normal lisps would parse out all local functions and disallow redinitions at&lt;BR /&gt;
run-time. noone of you evere changed local definitons ever, did someone?&lt;BR /&gt;
I know only of S::STARTUP redefinitions.&lt;BR /&gt;
but keeping it backwards compatible forces this antique behaviour.&lt;BR /&gt;
&lt;BR /&gt;
the warning is for the more experienced users to see bottlenecks in the your&lt;BR /&gt;
code.&lt;BR /&gt;
your style is perfect for scheme or common lisp. there they would be even&lt;BR /&gt;
closures (ie: capture outer variables used inside whcih woudl be fine for&lt;BR /&gt;
callbacks, action_tiles)&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;   (defun func1 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func2 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (defun func3 ( / )&lt;BR /&gt;
&amp;gt;     (do_something_else)&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (func_main)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; This style has always worked and continues to work well for me.  The&lt;BR /&gt;
&amp;gt; only problem is VLisp keeps warning me not to do it.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; I don' know if it's related, but I also have programs that will not&lt;BR /&gt;
&amp;gt; run when VLisp is loaded.  They run fine when it's not loaded.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; When doing an animated walkthrough on my programs VLisp will tell me&lt;BR /&gt;
&amp;gt; I'm crashing in spots that aren't even close to where the problem&lt;BR /&gt;
&amp;gt; really is.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Any help would be appreciated.&lt;/SEIBERTRON&gt;</description>
      <pubDate>Sat, 15 Jan 2000 21:36:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812924#M161250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-15T21:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Program Style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812925#M161251</link>
      <description>The real problem with this is that unlike AutoLISP,&lt;BR /&gt;
under VLISP now DEFUN is a _heavy_ operation, taking up&lt;BR /&gt;
much more time then before in ALISP, because it's now&lt;BR /&gt;
compiling the code also. In ALISP defun was just a little &lt;BR /&gt;
bit more then a LIST statement, but it is much more now &lt;BR /&gt;
in VLISP.&lt;BR /&gt;
&lt;BR /&gt;
It's fine for interface functions which only get called so often&lt;BR /&gt;
to be written this way, but for a frequently called library &lt;BR /&gt;
functions it's a no-no. In Common Lisp there's a LABELS form for&lt;BR /&gt;
defining local functions accessible only within that statement, &lt;BR /&gt;
but there's nothing for that in VLISP, except for nested defuns, &lt;BR /&gt;
which are slow since VLISP re-compiles them at run-time every &lt;BR /&gt;
time the parent function gets called. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
So if used in library code that have to be the most efficient,&lt;BR /&gt;
we must move those nested defun definitions out of the function,&lt;BR /&gt;
thus polluting the name space with functions we'll never call&lt;BR /&gt;
from outside.&lt;BR /&gt;
&lt;BR /&gt;
On Fri, 14 Jan 2000 07:12:59 EST, Jon Fleming &lt;JONF&gt;&lt;BR /&gt;
wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I use that style all the time when doing dialog boxes, so I can use the &lt;BR /&gt;
&amp;gt;same names for callback functions in different routines without &lt;BR /&gt;
&amp;gt;interference.  It does tend to lead to long piles of code inside the &lt;BR /&gt;
&amp;gt;main routine.  I believe VL is just warning you in case you've forgotten &lt;BR /&gt;
&amp;gt;that the function name is a local variable.  I believe that using that &lt;BR /&gt;
&amp;gt;style does no harm.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;I also think it has nothing to do with your other problems, but I have &lt;BR /&gt;
&amp;gt;no idea what's causing your other problems.&lt;/JONF&gt;</description>
      <pubDate>Sun, 16 Jan 2000 01:49:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812925#M161251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-16T01:49:41Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812926#M161252</link>
      <description>Good point.  I hadn't considered the extra time for vlisp to compile these&lt;BR /&gt;
nested defuns.  What would be the implications of using defun-q, instead?&lt;BR /&gt;
&lt;BR /&gt;
Mike Weaver&lt;BR /&gt;
&lt;BR /&gt;
"Vladimir Nesterovsky" &lt;VNESTR&gt; wrote in message&lt;BR /&gt;
news:38822058.6931076@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; The real problem with this is that unlike AutoLISP,&lt;BR /&gt;
&amp;gt; under VLISP now DEFUN is a _heavy_ operation, taking up&lt;BR /&gt;
&amp;gt; much more time then before in ALISP, because it's now&lt;BR /&gt;
&amp;gt; compiling the code also. In ALISP defun was just a little&lt;BR /&gt;
&amp;gt; bit more then a LIST statement, but it is much more now&lt;BR /&gt;
&amp;gt; in VLISP.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; It's fine for interface functions which only get called so often&lt;BR /&gt;
&amp;gt; to be written this way, but for a frequently called library&lt;BR /&gt;
&amp;gt; functions it's a no-no. In Common Lisp there's a LABELS form for&lt;BR /&gt;
&amp;gt; defining local functions accessible only within that statement,&lt;BR /&gt;
&amp;gt; but there's nothing for that in VLISP, except for nested defuns,&lt;BR /&gt;
&amp;gt; which are slow since VLISP re-compiles them at run-time every&lt;BR /&gt;
&amp;gt; time the parent function gets called. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So if used in library code that have to be the most efficient,&lt;BR /&gt;
&amp;gt; we must move those nested defun definitions out of the function,&lt;BR /&gt;
&amp;gt; thus polluting the name space with functions we'll never call&lt;BR /&gt;
&amp;gt; from outside.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; On Fri, 14 Jan 2000 07:12:59 EST, Jon Fleming &lt;JONF&gt;&lt;BR /&gt;
&amp;gt; wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;I use that style all the time when doing dialog boxes, so I can use the&lt;BR /&gt;
&amp;gt; &amp;gt;same names for callback functions in different routines without&lt;BR /&gt;
&amp;gt; &amp;gt;interference.  It does tend to lead to long piles of code inside the&lt;BR /&gt;
&amp;gt; &amp;gt;main routine.  I believe VL is just warning you in case you've forgotten&lt;BR /&gt;
&amp;gt; &amp;gt;that the function name is a local variable.  I believe that using that&lt;BR /&gt;
&amp;gt; &amp;gt;style does no harm.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;I also think it has nothing to do with your other problems, but I have&lt;BR /&gt;
&amp;gt; &amp;gt;no idea what's causing your other problems.&lt;BR /&gt;
&amp;gt;&lt;/JONF&gt;&lt;/VNESTR&gt;</description>
      <pubDate>Mon, 17 Jan 2000 15:30:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812926#M161252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-17T15:30:34Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812927#M161253</link>
      <description>On Mon, 17 Jan 2000 06:30:34 -0900, "Michael Weaver"&lt;BR /&gt;
&lt;MWEAVER&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Good point.  I hadn't considered the extra time for vlisp to compile these&lt;BR /&gt;
&amp;gt;nested defuns.  What would be the implications of using defun-q, instead?&lt;BR /&gt;
&lt;BR /&gt;
I don't think it'll change much, since at the execution time the &lt;BR /&gt;
function definition code list (a.k.a. "lambda list") will still&lt;BR /&gt;
need to be compiled by VLISP internally. &lt;BR /&gt;
&lt;BR /&gt;
But I haven't checked this specifically. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
What I did observed, was a case of defining &lt;BR /&gt;
some POP utility like this: &lt;BR /&gt;
&lt;BR /&gt;
(defun pop1 (qlst / frst)&lt;BR /&gt;
 (setq frst (car (vl-symbol-value qlst)))&lt;BR /&gt;
 (set qlst (cdr (vl-symbol-value qlst)))&lt;BR /&gt;
 frst)&lt;BR /&gt;
&lt;BR /&gt;
which worked OK. But then I tried being "smarter" as in&lt;BR /&gt;
&lt;BR /&gt;
(defun pop2 (qlst)&lt;BR /&gt;
 ((list nil&lt;BR /&gt;
   (list 'setq qlst (list 'cdr qlst))&lt;BR /&gt;
   (car (vl-symbol-value qlst)))))&lt;BR /&gt;
&lt;BR /&gt;
It worked fine too, so I ended up using it as my library routine;&lt;BR /&gt;
I thought it looked "cleaner". But then I had to port over to&lt;BR /&gt;
r2000, and suddenly some other program became very slow. Much&lt;BR /&gt;
to my surprise had I found out after some debugging and&lt;BR /&gt;
profiling, that it was this version of POP that made it run&lt;BR /&gt;
very slow. It was never a problem in r14; timings were identical&lt;BR /&gt;
there for the two versions.&lt;BR /&gt;
&lt;BR /&gt;
It's clear in what way the second version is different from the first:&lt;BR /&gt;
it creates function list at run time and then evaluates it, creating&lt;BR /&gt;
temporary LAMBDA internally (as I saw happening while debugging).&lt;BR /&gt;
&lt;BR /&gt;
For example,&lt;BR /&gt;
&lt;BR /&gt;
Command: !a nil&lt;BR /&gt;
Command: (repeat 1000 (progn (setq a (cons 1 a)) nil)) nil&lt;BR /&gt;
Command: (length a) 1000&lt;BR /&gt;
Command: (run-time '(repeat 1000 (pop2 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
1.21001 sec&lt;BR /&gt;
Command: (run-time '(repeat 1000 (pop1 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
0.0 sec&lt;BR /&gt;
Command: (run-time '(repeat 10000 (pop1 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
0.270005 sec&lt;BR /&gt;
&lt;BR /&gt;
So the second version is some _45_ times slower then the regular&lt;BR /&gt;
one, defined with defun.&lt;BR /&gt;
&lt;BR /&gt;
The same thing done in r14 (on this particular testing PC) &lt;BR /&gt;
yields 0.44 and 0.39 sec per 10000 runs for pop1 and pop2&lt;BR /&gt;
respectively, which is essentially the same. The second &lt;BR /&gt;
version is actually a little bit faster, which was another &lt;BR /&gt;
reason I preferred it previously.&lt;BR /&gt;
&lt;BR /&gt;
Not anymore. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
But of course it only mattered since it'd been used in a library&lt;BR /&gt;
routine. Again, would it be in some user-interface module,&lt;BR /&gt;
I wouldn't worry about it, since it'd be called only once&lt;BR /&gt;
per user interaction.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;"Vladimir Nesterovsky" &lt;VNESTR&gt; wrote in message&lt;BR /&gt;
&amp;gt;news:38822058.6931076@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt;&amp;gt; The real problem with this is that unlike AutoLISP,&lt;BR /&gt;
&amp;gt;&amp;gt; under VLISP now DEFUN is a _heavy_ operation, taking up&lt;BR /&gt;
&amp;gt;&amp;gt; much more time then before in ALISP, because it's now&lt;BR /&gt;
&amp;gt;&amp;gt; compiling the code also. In ALISP defun was just a little&lt;BR /&gt;
&amp;gt;&amp;gt; bit more then a LIST statement, but it is much more now&lt;BR /&gt;
&amp;gt;&amp;gt; in VLISP.&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; On Fri, 14 Jan 2000 07:12:59 EST, Jon Fleming &lt;JONF&gt;&lt;BR /&gt;
&amp;gt;&amp;gt; wrote:&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;I use that style all the time when doing dialog boxes, so I can use the&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;same names for callback functions in different routines without&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;interference.  It does tend to lead to long piles of code inside the&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;main routine.  I believe VL is just warning you in case you've forgotten&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;that the function name is a local variable.  I believe that using that&lt;BR /&gt;
&amp;gt;&amp;gt; &amp;gt;style does no harm.&lt;/JONF&gt;&lt;/VNESTR&gt;&lt;/MWEAVER&gt;</description>
      <pubDate>Tue, 18 Jan 2000 02:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812927#M161253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-18T02:33:44Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812928#M161254</link>
      <description>Okay,  for the sake of performance we shouldn't nest our defun's.&lt;BR /&gt;
&lt;BR /&gt;
What can we do, short of being very careful, to keep from loading two files&lt;BR /&gt;
with commonly named defuns that differ?  It seems like this kind of problem&lt;BR /&gt;
may not show itself for days (till the second routine is run and crashes).&lt;BR /&gt;
With nested defuns I don't need to worry about it, and in fact expect no&lt;BR /&gt;
problem because of this technique.&lt;BR /&gt;
&lt;BR /&gt;
Just trying to keep from stepping on my own toes.&lt;BR /&gt;
&lt;BR /&gt;
Mike Weaver&lt;BR /&gt;
&lt;BR /&gt;
"Vladimir Nesterovsky" &lt;VNESTR&gt; wrote in message&lt;BR /&gt;
news:388bc68a.35435368@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; On Mon, 17 Jan 2000 06:30:34 -0900, "Michael Weaver"&lt;BR /&gt;
&amp;gt; &lt;MWEAVER&gt; wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;Good point.  I hadn't considered the extra time for vlisp to compile&lt;BR /&gt;
these&lt;BR /&gt;
&amp;gt; &amp;gt;nested defuns.  What would be the implications of using defun-q, instead?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I don't think it'll change much, since at the execution time the&lt;BR /&gt;
&amp;gt; function definition code list (a.k.a. "lambda list") will still&lt;BR /&gt;
&amp;gt; need to be compiled by VLISP internally.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; But I haven't checked this specifically. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What I did observed, was a case of defining&lt;BR /&gt;
&amp;gt; some POP utility like this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun pop1 (qlst / frst)&lt;BR /&gt;
&amp;gt;  (setq frst (car (vl-symbol-value qlst)))&lt;BR /&gt;
&amp;gt;  (set qlst (cdr (vl-symbol-value qlst)))&lt;BR /&gt;
&amp;gt;  frst)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; which worked OK. But then I tried being "smarter" as in&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun pop2 (qlst)&lt;BR /&gt;
&amp;gt;  ((list nil&lt;BR /&gt;
&amp;gt;    (list 'setq qlst (list 'cdr qlst))&lt;BR /&gt;
&amp;gt;    (car (vl-symbol-value qlst)))))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; It worked fine too, so I ended up using it as my library routine;&lt;BR /&gt;
&amp;gt; I thought it looked "cleaner". But then I had to port over to&lt;BR /&gt;
&amp;gt; r2000, and suddenly some other program became very slow. Much&lt;BR /&gt;
&amp;gt; to my surprise had I found out after some debugging and&lt;BR /&gt;
&amp;gt; profiling, that it was this version of POP that made it run&lt;BR /&gt;
&amp;gt; very slow. It was never a problem in r14; timings were identical&lt;BR /&gt;
&amp;gt; there for the two versions.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; It's clear in what way the second version is different from the first:&lt;BR /&gt;
&amp;gt; it creates function list at run time and then evaluates it, creating&lt;BR /&gt;
&amp;gt; temporary LAMBDA internally (as I saw happening while debugging).&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; For example,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Command: !a nil&lt;BR /&gt;
&amp;gt; Command: (repeat 1000 (progn (setq a (cons 1 a)) nil)) nil&lt;BR /&gt;
&amp;gt; Command: (length a) 1000&lt;BR /&gt;
&amp;gt; Command: (run-time '(repeat 1000 (pop2 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
&amp;gt; 1.21001 sec&lt;BR /&gt;
&amp;gt; Command: (run-time '(repeat 1000 (pop1 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
&amp;gt; 0.0 sec&lt;BR /&gt;
&amp;gt; Command: (run-time '(repeat 10000 (pop1 'a) (setq a (cons 1 a)) nil))&lt;BR /&gt;
&amp;gt; 0.270005 sec&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So the second version is some _45_ times slower then the regular&lt;BR /&gt;
&amp;gt; one, defined with defun.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The same thing done in r14 (on this particular testing PC)&lt;BR /&gt;
&amp;gt; yields 0.44 and 0.39 sec per 10000 runs for pop1 and pop2&lt;BR /&gt;
&amp;gt; respectively, which is essentially the same. The second&lt;BR /&gt;
&amp;gt; version is actually a little bit faster, which was another&lt;BR /&gt;
&amp;gt; reason I preferred it previously.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Not anymore. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; But of course it only mattered since it'd been used in a library&lt;BR /&gt;
&amp;gt; routine. Again, would it be in some user-interface module,&lt;BR /&gt;
&amp;gt; I wouldn't worry about it, since it'd be called only once&lt;BR /&gt;
&amp;gt; per user interaction.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;"Vladimir Nesterovsky" &lt;VNESTR&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt;news:38822058.6931076@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; The real problem with this is that unlike AutoLISP,&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; under VLISP now DEFUN is a _heavy_ operation, taking up&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; much more time then before in ALISP, because it's now&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; compiling the code also. In ALISP defun was just a little&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; bit more then a LIST statement, but it is much more now&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; in VLISP.&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; On Fri, 14 Jan 2000 07:12:59 EST, Jon Fleming &lt;JONF&gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; wrote:&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;I use that style all the time when doing dialog boxes, so I can use&lt;BR /&gt;
the&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;same names for callback functions in different routines without&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;interference.  It does tend to lead to long piles of code inside the&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;main routine.  I believe VL is just warning you in case you've&lt;BR /&gt;
forgotten&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;that the function name is a local variable.  I believe that using that&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;style does no harm.&lt;BR /&gt;
&amp;gt;&lt;/JONF&gt;&lt;/VNESTR&gt;&lt;/MWEAVER&gt;&lt;/VNESTR&gt;</description>
      <pubDate>Tue, 18 Jan 2000 06:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812928#M161254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-18T06:23:53Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812929#M161255</link>
      <description>Keeping in mind that these defuns was actually &lt;BR /&gt;
ment to be internal for the main function, we &lt;BR /&gt;
should do the same thing we ought to do for &lt;BR /&gt;
each its internal symbol ---- prefix it with &lt;BR /&gt;
a function's name:&lt;BR /&gt;
&lt;BR /&gt;
(defun mainfunc%nestedf1 (...) ... )&lt;BR /&gt;
....&lt;BR /&gt;
(defun mainfunc ( mainfunc%arg1 ... / .... )&lt;BR /&gt;
 ....&lt;BR /&gt;
 (mainfunc%nested1 mainfunc%arg1)&lt;BR /&gt;
 ....&lt;BR /&gt;
 )&lt;BR /&gt;
&lt;BR /&gt;
thus ensuring there will be no name conflicts.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
&lt;BR /&gt;
On Mon, 17 Jan 2000 21:23:53 -0900, "Michael Weaver"&lt;BR /&gt;
&lt;MWEAVER&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Okay,  for the sake of performance we shouldn't nest our defun's.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;What can we do, short of being very careful, to keep from loading two files&lt;BR /&gt;
&amp;gt;with commonly named defuns that differ?  It seems like this kind of problem&lt;BR /&gt;
&amp;gt;may not show itself for days (till the second routine is run and crashes).&lt;BR /&gt;
&amp;gt;With nested defuns I don't need to worry about it, and in fact expect no&lt;BR /&gt;
&amp;gt;problem because of this technique.&lt;BR /&gt;
&lt;BR /&gt;
---&lt;BR /&gt;
Vlad   http://vnestr.tripod.com/&lt;/MWEAVER&gt;</description>
      <pubDate>Wed, 19 Jan 2000 01:03:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812929#M161255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-19T01:03:14Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812930#M161256</link>
      <description>That makes sense.&lt;BR /&gt;
&lt;BR /&gt;
I've been doing nested defuns for something over six years.  It's going to&lt;BR /&gt;
take getting used not doing them nested.  I guess I'll have to be more&lt;BR /&gt;
careful now with the scope of the variables in my subroutines:-)&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the pointers,&lt;BR /&gt;
Mike Weaver&lt;BR /&gt;
&lt;BR /&gt;
"Vladimir Nesterovsky" &lt;VNESTR&gt; wrote in message&lt;BR /&gt;
news:38860c48.522767@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; Keeping in mind that these defuns was actually&lt;BR /&gt;
&amp;gt; ment to be internal for the main function, we&lt;BR /&gt;
&amp;gt; should do the same thing we ought to do for&lt;BR /&gt;
&amp;gt; each its internal symbol ---- prefix it with&lt;BR /&gt;
&amp;gt; a function's name:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun mainfunc%nestedf1 (...) ... )&lt;BR /&gt;
&amp;gt; ....&lt;BR /&gt;
&amp;gt; (defun mainfunc ( mainfunc%arg1 ... / .... )&lt;BR /&gt;
&amp;gt;  ....&lt;BR /&gt;
&amp;gt;  (mainfunc%nested1 mainfunc%arg1)&lt;BR /&gt;
&amp;gt;  ....&lt;BR /&gt;
&amp;gt;  )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; thus ensuring there will be no name conflicts.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; HTH&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; On Mon, 17 Jan 2000 21:23:53 -0900, "Michael Weaver"&lt;BR /&gt;
&amp;gt; &lt;MWEAVER&gt; wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;Okay,  for the sake of performance we shouldn't nest our defun's.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;What can we do, short of being very careful, to keep from loading two&lt;BR /&gt;
files&lt;BR /&gt;
&amp;gt; &amp;gt;with commonly named defuns that differ?  It seems like this kind of&lt;BR /&gt;
problem&lt;BR /&gt;
&amp;gt; &amp;gt;may not show itself for days (till the second routine is run and&lt;BR /&gt;
crashes).&lt;BR /&gt;
&amp;gt; &amp;gt;With nested defuns I don't need to worry about it, and in fact expect no&lt;BR /&gt;
&amp;gt; &amp;gt;problem because of this technique.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ---&lt;BR /&gt;
&amp;gt; Vlad   http://vnestr.tripod.com/&lt;/MWEAVER&gt;&lt;/VNESTR&gt;</description>
      <pubDate>Wed, 19 Jan 2000 01:45:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812930#M161256</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-19T01:45:16Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812931#M161257</link>
      <description>On Tue, 18 Jan 2000 16:45:16 -0900, "Michael Weaver"&lt;BR /&gt;
&lt;MWEAVER&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;That makes sense.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;I've been doing nested defuns for something over six years.  It's going to&lt;BR /&gt;
&amp;gt;take getting used not doing them nested.  &lt;BR /&gt;
&lt;BR /&gt;
Unfortunately so. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; I guess I'll have to be more&lt;BR /&gt;
&amp;gt;careful now with the scope of the variables in my subroutines:-)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Thanks for the pointers,&lt;BR /&gt;
&lt;BR /&gt;
You're welcome. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks for the interesting discussion.&lt;BR /&gt;
---&lt;BR /&gt;
Vlad   http://vnestr.tripod.com/&lt;/MWEAVER&gt;</description>
      <pubDate>Wed, 19 Jan 2000 05:15:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/program-style/m-p/812931#M161257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-01-19T05:15:41Z</dc:date>
    </item>
  </channel>
</rss>

