C
C-turtle
One C program writing practice is this:
You write a function:
myfunction(){
// a lot of code
}
They you write a main with code to test myfunction:
main(int argc, char** argv){
// some myfunction() test and demo code
}
Then you progress to other functions and discard the main(){}
Other than simply commenting out the main() with the test code for my
function
is there any elegant way to keep it and disable it and enable it with
minimal work?
and minimal ugliness cluttering the file?
Is there an evolved practice and experience on this that some of the kind
souls on this newsgroup would like to share?
thanks
C-turtle
-=-
You write a function:
myfunction(){
// a lot of code
}
They you write a main with code to test myfunction:
main(int argc, char** argv){
// some myfunction() test and demo code
}
Then you progress to other functions and discard the main(){}
Other than simply commenting out the main() with the test code for my
function
is there any elegant way to keep it and disable it and enable it with
minimal work?
and minimal ugliness cluttering the file?
Is there an evolved practice and experience on this that some of the kind
souls on this newsgroup would like to share?
thanks
C-turtle
-=-