Can you 'include' files in Monkey inline

Monkey Forums/Monkey Beginners/Can you 'include' files in Monkey inline

MonkeyPlotter(Posted 2016) [#1]
My 'main' is getting a tad chunky and I was wanting to include other Monkey files inline....


Goodlookinguy(Posted 2016) [#2]
No you can't and it should never be a problem if you're using common development standards. You may want to spend time seeing what you can take out and separate into its own structure.


MonkeyPlotter(Posted 2016) [#3]
Take out and separate into its own 'structure'..... I'll search for examples of structures then, cheers.

http://www.monkey-x.com/Community/posts.php?topic=9919&post=107283&view=all#107283

Hmm, not really what I was hoping for, possibly I need to use and IDE that allows code folding. My current all in one file has 2245 lines and I'm used to (spoiled by) the functionality of Blitz 3D (whilst I appreciate that is a TOTALLY different product).

Being able to break large files into logical chunks is nice.


Goodlookinguy(Posted 2016) [#4]
By 'structure' I was simply referring to refactoring (and decompositioning) the design of your code. Not structs, which is this whole other thing.


tiresius(Posted 2016) [#5]
I didn't think you could code in monkey with a giant main() function, so do you just mean you have a single source code with all your classes in it?

Hopefully there isn't too much binding them together, then you can put classes in their own module (file) and use "import" command.
Hard to give a recommendation without seeing code, though.