CS 3304: Comparative Languages
Subprograms
[
Course Documents
] : [
Subprograms
]
Previous
Contents
Next
Keyword Index
Functions
Design Issues:
Are side effects allowed?
Two-way parameters (Ada does not allow)
Nonlocal reference (all allow)
What types of return values are allowed?
FORTRAN, Pascal, Modula-2: only simple types
C: any type except functions and arrays
Ada: any type (but subprograms are not types)
C++ and Java: like C, but also allow classes to be returned