Lesson 1.6. Flowchart

In the remainder of this course, we use a graphic representation of programs called flowchart. A flowchart has several advantages:

Each symbols of the ISO 5807 standard is presented below.

Begin, end and interruption

A box with rounded edges represents the beginning or the end of a branch of a flowchart.

Begin, end, break and interruption of a program

Internal treatment

An internal treatment, a calculation, an elementary processing is represented by a rectangle.

Representation of a calculation or an internal treatment in a flowchart

Read, write, input, output

The reading or writing of an external element, for example the keyboard, the screen, an external actuator data on the network, etc is represented with a parallelogram:

Read, write, input, output in flowcharts

Sub-program

Callig a sub-program is represented by a rectangle with doubled sides. Note that in C, subprograms do not exist, they are called functions.

Calling a sub-program in a flowchart

Conditional branching

Conditional branches, usually called tests, are represented by a diamond. The small circle represents the negation, as on logic gates. This is the branch that is executed if the test is false:

Representation of a conditional branch (a test) in a flowchart

Direction of the links

The direction of the connections must be from top to bottom. If this direction is not respected, it is necessary to arrow the link.

Example

Here is an example of a flow chart, you should normally understand how it works without difficulty:

Example of flowchart for C

Quiz

What is the purpose of a flowchart?

Check Bravo! Flowcharts have many uses! Try again...

Who is a flowchart intended for?

Check Good for you! When done properly, a flowchart should be understood by everyone. Try again...

How to represent the branch of a test that will be executed if it is false?

Check Bravo! The small circle represents the negation. The text is optional, but often clearer. Try again...

Should we put arrows on the links?

Check Bravo! To keep the flowcharts light, we only arrow the uplinks. Try again...

See also


Last update : 10/16/2022