====================================== Notes for Lecture 6 - January 31, 2008 ====================================== * Demo -- reading and processing files a line at a time ** 1-char ** 2-charbuf ** 3-charbuf ** 4-adder * Functions ** definition: gives code to run when function is called ** prototype: describes number and types of arguments and return type ** using module must have prototype in order to call the function ** defining module must have full definition ** prototype usually goes in a header file so it can be used multiple times ** call by value: parameters are like local variables ** actual arguments are copied to parameters on call; return value is copied to caller ** void as parameter list means no parameters ** void as result means no return value ** empty parameter list in definition *** is archaic -- means omit check for type compatibility *** don't use in new code