flowcharts

Flowcharts are one of the most used flowcharts for the expression of algorithms. It is very similar to what we understand by organizational chart, but more detailed and precise.

In this article we are going to continue advancing in the , which we have already begun to see in past installments of this manual. In the previous article we learned how to perform them and this time we are going to learn about the symbols used in flowcharts, which are much more useful to express the steps and situations of an algorithm.

What is an ordinogram

Ordinograms are one of the styles or techniques for the realization of algorithm diagrams. With them it is intended to visually express the flow of actions that is required for the implementation of an algorithm, without entering the code yet.

It’s about a specific style of flowchartswhich shows the logical and detailed sequence of operations that we need to carry out a programstep by step and with its different paths, decision making, repetitions, etc.

Like the organization chart, it must also be independent of the programming language we use. Therefore, they help us to clarify the ideas and actions that we are going to program later in any language. Due to their characteristics, they are suitable for imperative programming languages.

What are the differences between a flowchart, an organization chart and an ordinogram?

An organization chart is a schematic of the organization of an institution. Where we most commonly find them is when expressing the hierarchy of positions in which the personnel of a company is distributed.

Within the field of programming we find the flowcharts. Authors can usually refer to them interchangeably as “organizational charts” or also as “ordinograms”. Basically the same is understood, however, if we use the term “ordinogram” it is perfectly understood that we are referring to a specific scheme for the realization of flowcharts with which to express the steps of the algorithms. For its part, the word “organization chart” is more general and we can understand other things, even outside the field of programming.

See also  The body of a page

Why make ordinograms

The flowcharts, in this case the ordinograms, help us to carry out a representation of the algorithmsso that they can be expressed formally and programming language independent with which each person works. If we just want to specify the sequence of actions to carry out a process, without going into the particularities of a programming language, the creation of a flowchart is most convenient.

However, even if we want to land the algorithm in code right away, organization charts like these are very useful, especially when we are a bit lost and need to clarify ideas before going to code. Making diagrams with pencil and paper is very fast and we can easily adjust things, in a much more agile way than when we are expressing the actions in the code. They also allow us to be more creative and identify difficulties before starting to program.

When we are learning programming they are quite useful, since they allow us to go little by little and think about the algorithm without having to think yet about how that will be expressed in a programming language, such as its syntax, names, structures, etc. This previous step is therefore quite clarifying, to later program with greater security. However, experienced programmers rarely make flowcharts before writing an algorithm, because they are able to see the processes more clearly and it is less difficult for them to express them directly in code. For them, however, it can remain useful when the algorithm is very complex o includes many steps and decision making.

See also  Object Oriented Programming Theory

Structure of a flowchart

Every ordinogram must be composed of a pair of symbols to represent the beginning and the end of the execution of the program. Internally it will have a series of operations, which are part of the body of the algorithm:

The program execution start symbol:

After the start we will find the sequence of operations necessary for the correct functioning of the program. The operations will follow an order (from top to bottom and from left to right).

Finally we find the symbol that indicates the end of the program.

symbols used

Below we find the symbols used in the ordinograms and their descriptions.

Description: For start/end or for an indeterminate stop

Description: Generic input/output symbol

Description: Represents a general operation or process with memory data.

Description: Subprogram or subroutine symbol. It is used to make a call to a program module.

Description: Decision symbol to ask a question with two possible answers. It is what we call simple selection symbol.

Description: Multiple selection symbol

Description: Defined loop symbol.

Description: Connector. It is used to group multiple flow lines leaving the same source.

Description: Symbol to put comments

Rules when making ordinograms

Here we leave you a series of important rules that you should follow when composing ordinograms:

  • All symbols used must be linked by flow lines.
  • Can’t cross flow lines
  • Several flow lines can arrive at a process symbol, but only one can exit it.
  • The start symbol cannot be reached by any flow lines
  • No flow line can come out of an end symbol, but several can reach it.
See also  Communications programs

Examples of flowcharts

We end this article with some images of flowcharts that we have built to represent simple algorithms, so that you can see the symbols put together in a utility diagram.

The first of the examples that you find below serves to express an algorithm in which the greater of two numbers is calculated. In the diagram you will find expressed the input data collection, the calculation of the largest of the numbers and finally the output that informs the user.

Now we are going to see a second example of an algorithm expressed by a flowchart that allows us to make a conversion of temperature units. Returns the entered degrees in Kelvin and Fahrenheit.

Conclusion on the ordinograms

In this article we have known flowcharts, which are a type of flowchart to express algorithms, also often referred to as flowchart.

These types of diagrams are quite useful since they allow us to express many things with symbols that are quick to write and help us clarify our ideas before starting to write the code in a programming language.

In the following article we are going to learn about another way of expressing an algorithm, with a technique that is even more similar to the code of languages, but that still has a great connection with the language that people use: the .

Loading Facebook Comments ...
Loading Disqus Comments ...