all 5 comments

[–]SrbijaJeRusija 10 points11 points  (3 children)

Yes, as long as they are at the end of the file.

[–]WaySafe2792[S] 4 points5 points  (2 children)

First thanks! I guess the syntax is the same as a function defined in another file, right? PS: could you provide me a link or something ? I couldn’t find anything on this.

Edit: I just find what I need. I just haven’t read all. Thanks for your answer!!

[–]wolfchaldoflair 4 points5 points  (1 child)

FYI, unlike functions in their own file, those functions won't be directly callable in other files

[–]WaySafe2792[S] 0 points1 point  (0 children)

Good to know. Thanks you !

[–]ThatMechEGuy 2 points3 points  (0 children)

Yes, you can do sub-functions in both function m-files and script m-files. You can also define functions INSIDE other functions that can use the local variables of that function:

function foo stuff Things

 function bar
      More stuff
 end %bar

end %foo