I am just trying something with somebody else\'s code.
I have two functions:
int Triangle(Render *render, int numParts, Token *nameList, Pointer *valueLi
You shouldn't put functions together, you should split them apart. Put a new function wherever you can name them -- try to make them as small as you can. If you want a function that does all of that stuff, have a function that calls the other functions.
int foobar() {
int a;
int b;
/* do a whole bunch of stuff with a */
/* do a whole bunch of stuff with b */
return a + b;
}
this is sort of what you're trying to do. Instead, do this:
int foo(){
int a;
/* do a bunch of stuff with a */
return a;
}
int bar() {
int b;
/* do a bunch of stuff with b */
return b;
}
int foobar() {
return foo() + bar();
}
The result will be cleaner, easier to maintain and re-usable.