How to Convert Flowcharts to Pseudocode

By Maureen Bruen

i Pixland/Pixland/Getty Images

To convert flowcharts to pseudocode, you must understand exactly what is described in the flowchart in order to translate it. Flowcharting is a tool for graphically representing the processes that will be performed by a program. In most cases these flowcharts use graphic symbols that represent decisions or processes and terminators and arrows to graphically represent what conditions initiate specific processes to be performed.

Step 1

Open the flowchart and locate the starting location on the chart. Write the pseudocode that is equivalent to starting your program. For example, OPEN sqlphonedirectory is used as pseudocode for opening a database to be loaded.

Step 2

Write the pseudocode that is equivalent to the rectangular process boxes in your diagram. For example, a process box that assigns fields to be loaded to a database translates to SET NameField = sqlname, TelephoneNumber = sqlphone and so on.

Step 3

Write the pseudocode for the diamond-shaped decision boxes in your diagram. The decisions for loading fields into a database in this example translates to IF records-are-left THEN load-the-next-record else load-the-phonedirectory-database. The true or yes condition is stated in the IF portion of your pseudocode. The false or no condition is stated in the THEN portion of your pseudocode.

Step 4

Write the pseudocode for the end terminator of the flowchart. This pseudocode translates into anything you need to do to end the processing of your program. An example of this is CLOSE sqlphonedirectory, which closes the sqlphonedirectory database used in the program.

Step 5

Combine all of your converted statements above and you have a flowchart that has been converted to pseudocode.

×