Mail Archives: djgpp/1998/08/12/17:30:32
Destination: malcolmj7 AT aol DOT com (MalcolmJ7)
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: 12 Aug 1998 06:21:17 GMT:
>first off, prototyping isn't the most useful thing in the world. When you
>prototype you just declare the function before actually writing it.
Prototyping is very important for a readable code. First, you have the
prototype in an includefile so you can easily look up the arguments and second
you can use it as a documentation by using good arguments in the prototype.
int function(int, int, int);
isn't very helpfull and after a while you have to look up the code to know
which parameter has what meaning.
int function(int X_Axis, int Y_Axis, int Z_Axis);
provides the same information to the compiler and helps to document the code
without much work.
I'd recommend to protoype all functions that you want to use more often then
just for a quick and dirty hack.
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
- Raw text -