Message 1 of 13
Program Style
Not applicable
01-14-2000
04:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I use that style all the time when doing dialog boxes, so I can use the
same names for callback functions in different routines without
interference. It does tend to lead to long piles of code inside the
main routine. I believe VL is just warning you in case you've forgotten
that the function name is a local variable. I believe that using that
style does no harm.
I also think it has nothing to do with your other problems, but I have
no idea what's causing your other problems.
jrf
Member of the Autodesk Discussion Forum Moderator Program
In article <387f149b.56973875@adesknews.autodesk.com>, Dave Seibert
wrote:
> When programming I have a certain style I follow, not so much for
> memory reasons, but for clarity. I keep readin warnings against using
> my style and would like to know why it is bad form.
>
> Here is the general form I use:
>
> (defun c:func_name ( / func_main func1 func2 func3)
> (defun func_main ( / )
> (do_something)
> )
> (defun func1 ( / )
> (do_something_else)
> )
> (defun func2 ( / )
> (do_something_else)
> )
> (defun func3 ( / )
> (do_something_else)
> )
> (func_main)
> )
>
> This style has always worked and continues to work well for me. The
> only problem is VLisp keeps warning me not to do it.
>
> I don' know if it's related, but I also have programs that will not
> run when VLisp is loaded. They run fine when it's not loaded.
>
> When doing an animated walkthrough on my programs VLisp will tell me
> I'm crashing in spots that aren't even close to where the problem
> really is.
>
> Any help would be appreciated.
>
same names for callback functions in different routines without
interference. It does tend to lead to long piles of code inside the
main routine. I believe VL is just warning you in case you've forgotten
that the function name is a local variable. I believe that using that
style does no harm.
I also think it has nothing to do with your other problems, but I have
no idea what's causing your other problems.
jrf
Member of the Autodesk Discussion Forum Moderator Program
In article <387f149b.56973875@adesknews.autodesk.com>, Dave Seibert
wrote:
> When programming I have a certain style I follow, not so much for
> memory reasons, but for clarity. I keep readin warnings against using
> my style and would like to know why it is bad form.
>
> Here is the general form I use:
>
> (defun c:func_name ( / func_main func1 func2 func3)
> (defun func_main ( / )
> (do_something)
> )
> (defun func1 ( / )
> (do_something_else)
> )
> (defun func2 ( / )
> (do_something_else)
> )
> (defun func3 ( / )
> (do_something_else)
> )
> (func_main)
> )
>
> This style has always worked and continues to work well for me. The
> only problem is VLisp keeps warning me not to do it.
>
> I don' know if it's related, but I also have programs that will not
> run when VLisp is loaded. They run fine when it's not loaded.
>
> When doing an animated walkthrough on my programs VLisp will tell me
> I'm crashing in spots that aren't even close to where the problem
> really is.
>
> Any help would be appreciated.
>