Skip to main content
Engineering LibreTexts

7: Program Control Functions

  • Page ID
    10281
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    • 7.1: Psuedocode Examples for Functions
      No standard for pseudocode syntax exists. However, there are some commonly followed conventions to help make pseudocode written by one programmer easily understood by another programmer. The following describes a method for using pseudocode for functions that would be understood by programmers.
    • 7.2: Hierarchy or Structure Chart
      The hierarchy chart (also known as a structure chart) shows the relationship of various units. Its name comes from its general use in showing the organization (or structure) of a business. The President at the top, then vice presidents on the next level, etc.
    • 7.3: Program Control Functions
      The concept is everywhere present in the real world about us. Simply put it is to take a large complicated problem and to divide it into smaller manageable pieces. The hierarchy chart of any large organization (government unit, company, university, hospital, etc.) will show levels of people with job titles that indicate a different area of responsibility.
    • 7.4: Void Data Type
      This data type was added in the transition from "C" to "C++". In "C" by default a function returned an integer data type. Some functions don't return a value of any kind. Thus, the need to have a data type that indicates nothing is being returned. The void data type is mainly used in the definition and prototyping of functions to indicate that either nothing is being passed in and/or nothing is being passed out.
    • 7.5: Documentation and Making Source Code Readable
      Within the programming industry there is a desire to make software programs easy to maintain. The desire centers in money. Simply put, it costs less money to maintain a well written program. One important aspect of program maintenance is making source code listings clear and as easy to read as possible.
    • 7.6: Practice 6 Program Control Functions


    This page titled 7: Program Control Functions is shared under a CC BY license and was authored, remixed, and/or curated by Kenneth Leroy Busbee (OpenStax CNX) .

    • Was this article helpful?