Function

Functions
Functions are units of code that are executed.

void main {  // When main is called, the code within this function executes. }

Parameters
Parameters are variables that are supplied to the function when the function is called.

void SaySomething(string str) {   //When SaySomething("Hi!") is called, the code within this function will have //access to a variable named str, and will contain the value "Hi!" }

Return Types
In programming, some functions have a return type. A return type is a data type that the function can be expected to return.

int SquareIt(int number) { // This function will always return a value that has an int type value. }

Zur 15:21, 2 August 2006 (PDT)