ENGINEER 1D04 Lecture Notes - Lecture 6: Evaluation Strategy, Function Application

42 views1 pages
scarletotter976 and 37168 others unlocked
ENGINEER 1D04 Full Course Notes
4
ENGINEER 1D04 Full Course Notes
Verified Note
4 documents

Document Summary

17/10/2016: a function"s main purpose is reducing the code, duplication makes the program longer, hard to read and hard to debug, look at how to define a function. (very important, the p1 and p2 are called formal parameters. Not all functions must have these parameters: the parameters are not the actual variable, the parameter is used to represent the input to a function. These parameters become the local variables of the function call: function application is the calling of a function. Note that the parameters must be of the same type as the variable: the parameters used in the function call are the actual parameters. These parameters re the parameters that will be used: the calling program"s execution is suspended. The formal parameters are bound to the values of the actual parameters: the body of the function is executed, the output value of the function is returned to the calling program and the calling program"s execution is resumed.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents