Experimentalist
Well-known member
Hi
My backgound in writing code is that I am a hobbyist programmer self taught along time ago in VB6 and then moved to C#, a very comfortable place in comparison to C/C++ it seems. I am allowed to abuse a lot of purist programming principles it would seem in C#, not as much as VB allowed, but a lot it seems when compared to C/C++. One step at a time I suppose.
I am working in the Arduino environment for the project I am currently working on and I am using a tool called Visual Micro (http://www.visualmicro.com/) to allow me to develop in the environment I know best, Visual Studio 2010. I highly recommend this to anyone who uses Visual Studio day to day as you get many of the advantages of intellisense single button compile and single button compile and upload straight from the IDE. It is great, and no I am not affiliated in any way, I just think it is a great tool.
What I would like to do is break my code into manageable chunks as I am finding it harder and harder to navigate as it grows.
I find it very frustrating not being able/ not knowing how to create collapsible regions that I use extensively in C# programming. I have frigged it using a preprocessor block "#if 1 . . . #endif" to wrap my ever growing variable declaration block. Fortunately at least the methods collapse.
What I would like to do is split my code into manageable files. I have nearly 4000 lines of code now and was wondering what is the best way to approach this. I have had a look at creating libraries but this does not fit well at this time.
Do I just create seperate xxx.c, yyy.c, zzz.c, etc files in my project folder and allow the compiler to include them?
Sorry for those that find the question tedious, we all have to learn.
I welcome any constructive advice and will try to absorb any numpty abuse
My backgound in writing code is that I am a hobbyist programmer self taught along time ago in VB6 and then moved to C#, a very comfortable place in comparison to C/C++ it seems. I am allowed to abuse a lot of purist programming principles it would seem in C#, not as much as VB allowed, but a lot it seems when compared to C/C++. One step at a time I suppose.
I am working in the Arduino environment for the project I am currently working on and I am using a tool called Visual Micro (http://www.visualmicro.com/) to allow me to develop in the environment I know best, Visual Studio 2010. I highly recommend this to anyone who uses Visual Studio day to day as you get many of the advantages of intellisense single button compile and single button compile and upload straight from the IDE. It is great, and no I am not affiliated in any way, I just think it is a great tool.
What I would like to do is break my code into manageable chunks as I am finding it harder and harder to navigate as it grows.
I find it very frustrating not being able/ not knowing how to create collapsible regions that I use extensively in C# programming. I have frigged it using a preprocessor block "#if 1 . . . #endif" to wrap my ever growing variable declaration block. Fortunately at least the methods collapse.
What I would like to do is split my code into manageable files. I have nearly 4000 lines of code now and was wondering what is the best way to approach this. I have had a look at creating libraries but this does not fit well at this time.
Do I just create seperate xxx.c, yyy.c, zzz.c, etc files in my project folder and allow the compiler to include them?
Sorry for those that find the question tedious, we all have to learn.
I welcome any constructive advice and will try to absorb any numpty abuse