How to Convert Flowcharts to Pseudocodeby Maureen Bruen
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.
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.
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.
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.
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.
Combine all of your converted statements above and you have a flowchart that has been converted to pseudocode.