Groups > Design > 3dsmax MAXScript > Re: Nested functions




Re: Nested functions

Re: Nested functions
Wed, 19 Sep 2007 14:55:10 +000
Often times when I am optimizing a script I will replace a for loop with a 
mapped function. I leave those inline for readabilities sake.

<Stokes> wrote in message news:5725890@discussion.autodesk.com...
Is it a significant efficiency hit to define a 'private' function within 
another function? Does every call to the parent function redefine the nested 
one?

I originally tried doing this as an experiment, but I've since noticed 
functions-within-functions like this being done in some of the utility 
scripts that ship with 3dsmax.

If they don't pose a significant problem, they are a tidy way to convert 
functions that iterate over an array into mapped functions.

Post Reply
about | contact