A procedure is a section of code that is separate from the rest of the main body. It can be called from other points in the code in order to execute it. e.g.
' Main Body of the code
' Procedure Definition
Procedure PrintDouble(int x)
In this example, the code that is written inside the body of PrintDouble will be executed at the point from where it is called. This example also shows the use of variable passing with procedures.
The procedure definition must be placed after the end of the main body of code.