Revision – Pseudocode

So what is pseudocode?

Way back when programming was simple, whole systems could be designed using a set of flowcharts and no further design was needed. This was especially useful for programming languages which were low level (close to machine code).

As languages became more complex, there developed a need to describe the logic using something which resembled natural language (how we speak, or in fact what you are reading now.). These high level languages (closer to natural language) could use a common language indepedant structured wording to describe the logic.

In short, pseudocode is structured English which describes the logic of a program.

An example:

WHILE login <> true

      OUTPUT “enter your username”

       INPUT to uname

       OUTPUT “enter your password”

       INPUT to password

       IF uname = “bill” AND password = “ted”

                THEN pword = true

                 ELSE pword = false

 

As you can see in the example above, your main coding blocks are very similar to the final piece of code that is produced, however no actual language syntax is used.

Leave a comment