Functions

  1. Functions
    1. Branches off from program to function and then returns to program
    2. Functions either return a value or nothing (void)
  2. Parts of a function
    1. header  return type functionname(type parameter1. type parameter2, etc.)
      1. return type
      2. function name
      3. parameters
        1. a declaration of what type of value will be passed into the function
        2. the actual values passed into the calling function are arguments
        3. function signature - the name of the function and its parameters
      4. body
        1. {     opening brace
        2.        statements
        3.       return - returns a value
        4. }     closing brace

    Back to the Main Menu