The following symbols are commonly used in flowcharts. These symbols are connected by lines with arrows to show the flow from one step to another.
|
Ovals are used to indicate both the start and end points in a series of steps.
|
|
A box is used to represent an individual step or activity in the process.
|
Yes
|
A diamond shape shows a point in the process when a decision must be made to determine what will happen next. Decisions are denoted as questions with two or more branches indicating the possible results. Usually, these decisions have two branches, one for yes and one for no. Lines extending from diamonds must be labeled with one of these possible answers.
|
|
A circle is used to indicate when a particular step is connected to another part or page of the flowchart. A letter is often put inside the circle to help clarify the continuation.
|
|
A triangle shows where a measurement is taken during the process.
|
Conditional statements reflected in a flowchart are used to create source code. Most programming languages use conditional statements such as if...then or if...then...else statements. For example, the following is a simple if...then statement about a coffee pot that directs the program to make coffee if the value or variable is equal to empty:
if coffee pot = empty
then make coffee
A variation of this statement can add an else clause:
if coffee pot != empty
then pour a cup of coffee
else make coffee
Note that != means “does not equal.”
Share with your friends: |