Chapter 6: Runtime System

Procedure

. A procedure definition is a declaration that associates an identifier with a statement (procedure body)

. When a procedure name appears in an executable statement, it is called at that point

. Formal parameters are the one that appear in declaration. Actual Parameters are the one that appear in when a procedure is called .

A procedure definition is a declaration that associates an identifier with a statement. The identifier is the procedure name and the statement is the procedure body. Procedures that return value are also referred as procedures so a complete program is also a procedure. When a procedure name appears within an executable statement, the procedure is said to be called at that point. Basically, this procedure call executes the procedure body. The identifiers appearing in the procedure definition are called the formal parameters (or just formals) of the procedure. Arguments, known as actual arguments may be passed to a called procedure, they are substituted for the formal parameters in the procedure body.