At a time when sorting a list of numbers or letters has become a daily slogan, the programmer needs to find an immediate solution to this problem. On the other hand, any administrative program has a similar structure to that of this program. Therefore, taking this into account, we will proceed to its programming.
The method we will use is the usual and consists of:
Suppose we want to alphabetically sort the table as C A D E B. Now and starting your imagination, think that this table has been stacked in a table called T composed of five windows:
On the other hand, there is an alternative record called R.
It is initially empty.
The steps to follow are as follows:
So to finish all.
Thus, the program alphabetically orders the list. But when presenting the results we will put two lists, one without order and another ordered.
NOTE: If the list of words you want to sort is very long, you may need to use the (CLEAR) command to save the memory (on some computers). View computer manual of the order CLEAR.
Listing 10 REM
= 120$ ALPHABETICAL **
20 CLEAR
30
PRINT
=
70
CLS
80
PRINT