UMBC CS 201, Fall 05
UMBC CMSC 201 Fall '05
CSEE | 201 | 201 F'05 | 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.

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

Sunday, 21-Aug-2005 09:53:43 EDT