Computer Science 433
Programming Languages
Fall 2014, The College of Saint Rose
Lecture 21: Subprograms
Date: Wednesday, November 12, 2014
Agenda
- Announcements
- Program/Problem Set 8: Datatypes, Expressions and
Assignments [HTML] [PDF] due tonight
- Language project progress reports due Monday
- Lecture 20 assignment recap
- Subprograms
- Program/Problem Set 9: Control and Subprograms [HTML] [PDF] out
Lecture 21 Assignment
Due at the start of class, Monday, November 17.
Please submit answers to these questions
in Submission
Box under "LA21" or in hard copy by the
start of our next class. We will discuss these questions at the
start of class, so no late submissions are accepted. Please be sure
that your name is clearly indicated in all submissions.
The readings for next class are Sebesta Chapter 9.
- Sebesta Problem Set Question 1, p. 438. (5 points)
- Sebesta Problem Set Question 5, p. 438. (3 points)
Terminology
- subprogram/procedure/subroutine/function/method
- subprogram definition
- subprogram call
- subprogram header/specification/interface
- type, name, parameters, body of a subprogram
- parameter profile/signature
- protocol
- subprogram declaration
- formal parameter/actual parameter
- positional parameters/keyword parameters
- default parameters
- variadic functions
- in/out/inout modes
- subprogram linkage
- activation record
- frame pointer
- dynamic link address
- call by value
- access path
- call by reference
- call by result
Examples
- cppdefault
- varargs
- callbyref
Links