View Single Post
  #10 (permalink)  
Old Thu Jul 16, 2009, 11:30am
NCASAUmp NCASAUmp is offline
Official Forum Member
 
Join Date: Apr 2007
Location: NC
Posts: 4,361
Quote:
Originally Posted by ronald View Post
Please explain or pm with explanation. Sounds interesting to me.

Thanks.
Oh man... That'd take a while.

In programming, you have different functions that will handle or evaluate certain tasks, and each function is read sequentially. First do this, then do that, then do the other thing. If your program is really short (and I do mean REALLY short), you'd probably have just one function called main(). All of your commands are in this one function, run in the exact order in which they're written down (like a repair manual).

However, these days, programs are never that short. As a result, you need to "break things up" in order to keep from re-writing the same thing over and over again. For example, if your program needs to display error messages under varying conditions, you'd write a function that handles this task and "call" that function when you need it. This is better than writing the code over and over again in the one long main() function.

So to a programmer, the best way to approach the rule book is NOT to look at it as one long, sequential document where everything follows the exact order laid out in the book (ie., one long main() function). The game is dynamic, and you need to treat it as such, calling up the various functions and subroutines as they come along.

You'd probably have about 1,000 separate functions.
__________________
Dave

I haven't decided if I should call it from the dugout or the outfield. Apparently, both have really great views!

Screw green, it ain't easy being blue!

I won't be coming here that much anymore. I might check in now and again.
Reply With Quote