UMBC CS 201, Fall 06
UMBC CMSC 201
Fall '06

CSEE | 201 | 201 F'06 | lectures | news | help

Calling a function

What happens when we call a function?
  1. The argument expressions are evaluated.
  2. The resulting values are copied into the corresponding parameters, performing any required type coersion.
  3. The statements in the function's body are evaluated in order.
  4. When a return statement is evaluated, the value of its argument is converted to the type of the function's return-type and used as the function's result.
  5. the calling program continues after "substituting" the function's returned value in place of the function call.
Details


CSEE | 201 | 201 F'06 | lectures | news | help

Tuesday, 22-Aug-2006 07:14:16 EDT