Cpp Notes

F

F: Functions

  • A function specifies an action or a computation that takes the system from one consistent state to the next.
  • It is the fundamental building block of programs.
  • It should be possible to name a function meaningfully, to specify the requirements of its argument, and clearly state the relationship between the arguments and the result.
  • An implementation is not a specification. Try to think about what a function does as well as about how it does it.
  • Functions are the most critical part in most interfaces, so see the interface rules.

Subsections