Control Flow Diagram in Software Engineering: Symbols & Example

Instructor: Martin Gibbs

Martin has 16 years experience in Human Resources Information Systems and has a PhD in Information Technology Management. He is an adjunct professor of computer science and computer programming.

When designing software, we need to understand how the control of the program flows. This lesson will explain the control flow diagram. We will discuss the symbols involved and provide an example.

Control Flow Diagrams

A control flow diagram helps us understand the detail of a process. It shows us where control starts and ends and where it may branch off in another direction, given certain situations. Let's say you are working on software to start a machine. What happens if the engine is flooded, or a spark plug is broken? Control then changes the flow to other parts of the software. We can represent these branches with a diagram. The flow diagram is helpful because it can be understood by both stakeholders and systems professionals. Although some of the symbols might not be fully understood by the layperson, they can still grasp the general concept.


Before we cover all of the symbols in the diagram, let's look at an example. Keeping with the idea of an engine-start program, the following shows flow through the software:

Control Flow Diagram example

Even to the non-IT person, it is fairly clear that the software will attempt to start engines. If errors occur, then it will branch off into different directions. The symbols might not be completely clear, so we'll look at those next.


The general flow should make sense:

  • try to start the engines
  • run a problem check
  • display alerts if it can't start
  • disengage the clutch
  • try restarting

But what about the vertical lines and dashed arrows?

Vertical Bar

Control flow vertical bar

The vertical bar indicates input or output from the current control specification, that is the diagram we are working on. Think of the bar as a window INTO or OUT OF the entire specification/flow. Additional notes, including an arrow, indicate further detail of the flow through that window.

Dashed Arrow

The input to the Problem Check step is Flooded. The input into the Restart Routine is clutch disengaged. These inputs are noted by the dashed arrow:

Control flow dashed arrow

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account