How do you style your source code?
LausX
how do you organize your source code of a big project?
Normally I try to follow the programming style guides for c++ or Java and now I want to adopt them, as far as possible, for Igor. Therefore I use a lot of set- and getter functions and also like to have a header file as in c++. If I try this and put all the constants to this the calling procedure file didn't know the constants. Is there any possibility for this?
But the most important question for me is, what kind of style guide do you use?
Thanks,
well as Igor procedures are not object orientated, there is no use for getters and setter functions. And I also think that every programming language deserves its own style.
First question would be, how big is big?
Are we talking about 500 lines of code, or something like 400 functions in 10 files compromising >10000 lines of code?
In general I'll try to follow:
DeletePoints
,Extract
,MatrixOp
are underrated.#pragma rtgGlobals=3
and enable "WAVE/NVAR/SVAR Checking".SetDataFolder
, nearly all functions/operations work with datafolder references.I'm also currently playing with unit testing[1] and doxygen[2] docu for procedures.
[1]: http://www.igorexchange.com/project/unitTesting
[2]: http://www.igorexchange.com/project/doxIPFFilter
October 31, 2013 at 03:24 pm - Permalink