Parameters

Parameters are the way program parts communicate with each other. One program part will call a subprogram to do some task. In order for the subprogram to perform the task some information may need to be given to it. Once the subprogram is done, it may need to give the calling program part the results of its task. Parameters have 3 communication methods:

Actual Parameters

Actual parameters are the values that are actually sent to the subprogram. Actual parameters are the way that the calling program part sends information to the called subprogram. In the case of procedures, they can also bring information back from the called subprogram. With functions, all information coming back from the called subprogram is sent back using a function return statement. In C, "return (value_of_type_return_type);".

Formal Parameters

Formal parameters are those defined in the subprogram. They must match the actual parameters in number, type, and order. If you send 3 integers, you must receive 3 integers. If you send an integer, a float, and a character, you must receive an integer, a float, and a character IN THAT ORDER.