Thread: Multiple Files
View Single Post
  #2   Spotlight this post!  
Unread 29-03-2005, 01:08
dm0ney's Avatar
dm0ney dm0ney is offline
Will Code For Food (Food Optional)
AKA: Deepak Mishra
None #0217 (The ThunderChickens)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Shelby Twp., MI
Posts: 48
dm0ney will become famous soon enough
Send a message via AIM to dm0ney
Re: Multiple Files

Quote:
Originally Posted by Ewilliams2006
Since the default code is made of multiple files, it requires a specific linking script, correct? I am a programmer that can make simple VB, C, C++, and Java programs work but I don't understand much about coding theory. Can anyone explain what the benefit of multiple files is?

Along that same line, the linker provides a way for a method in one file call a method in another file, right? How are these linking scripts made?

Any answer would be greatly appreciated.
Thanks in advance,
Eric

The main benefit of multiple files is organization!
Technically... every function and call you make slows your program down since current commands are put on hold to the stack and the new function is addressed, things are put to the stack and then taken care of in order.

The multiple files also allow one to split up code for different people to work on as well as allowing you or somebody else to change code rapidly if you can go to a specific file instead of one monster file that you must use search to find areas in.

I cant tell you exactly how linker scripts are done... I know the linker is run and thats about where my knowledge ends.
The linker does have all functions and callings done so they can be called from different files.
__________________

Alumni
Team #217, The ThunderChickens



Student, Class of 2009
California Institute of Technology