20-CS-4003-001 Organization of Programming Languages Fall 2017
Parameter Passing

Lambda calculus, Type theory, Formal semantics, Program analysis

All lectures
Call-By-XXXX examples

call-by-value.cc     Call-by-value. copies of values of actual parameters are passed and actual parameters are not affected by what happens in the function.
 
call-by-value-result.cc     Call-by-value-result. copies of values of actual parameters are passed and actual parameters are not affected by what happens in the function until the function returns.
 
call-by-reference.cc     Call-by-reference. address of the actual parameter is passed; the variable is always accessed through its address so the current value is always used when referenced and assignment changes that value.
 
call-by-name.cc     Call-by-name. a function that computes the value of the actual parameter is passed to the called function.
 
call-aux.cc     Implements functions used by the first three above.
 
Makefile     In case you want to try the code.