
Originally Posted by
Tyrn
A function is a separate area of code to be referenced.
You send arguments from your main code to the function, the function ( separate code ) does some shit with those arguments, and then it returns a value.
The reason you use functions is to reduce redundancy in your program. Say you need to add two values over and over and over and over. Well you can just reference the function you make then, instead of having to type the same code over, and over, and over.
Get it? If not too bad.