
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
To everyone that has posted a reply, I will try to put your suggestions into practice. thank you, Bradley [EMAIL PROTECTED] (Bradley) wrote in message news:<[EMAIL PROTECTED]>... > Hi, I am an Assembly language programmer of 12 years, now starting to > code in C. I am still a C newbie and have some confusion. > > I am finding that I am getting bogged down with uses of static / > extern for functions and variables. I am also getting a bit confused > with function prototyping and header files. I have searched the > internet quite a bit but I am still confused. > > I think that I know the following; (Please clarify) > > Static variables are local to the .c file. Static variables also can > stay around after the function is exited. > A variable declared outside of Main is global and a .c file that wants > to use it must extern it. > > Static functions are visible to the .c file. My problem here is why > declare them static? Isn't static assumed? > A function can be called by other .c files if its prototype is > External. > > I have read that it is good C practice to code prototypes for each > function. Should I code the prototypes in a .h file associated with > the .c file? Where do I extern the prototype if I plan to use the > function in multiple .c files ? > > Any help / suggestions would be greatly appreciated. > > thank you > > Bradley
| <-- __Chronological__ --> | <-- __Thread__ --> |