Science Fair Project Encyclopedia
Pseudocode is a generic way of describing an algorithm without use of any specific programming language syntax. It is, as the name suggests, pseudo code. It cannot be executed on a real computer else it would be actual code and not pseudocode. It resembles real programming code except that it can be written at any level of detail — from code that could be actual code (with a slightly altered existing compiler), to code that needs a human level intelligence to parse its meaning.
Pseudocode, by nature, exists in various forms, although most borrow syntax from popular programming languages (like C, Lisp, or Fortran). Natural language is used whenever details are unimportant or distracting (by way of example, it is common to see a line of pseudocode "swap a and b" — a task which any programmer knows how to do in 3 lines).
Computer science textbooks often use pseudocode in their examples so that all programmers can understand them, even if they do not all know the same programming languages. Since pseudocode style varies from author to author, there is usually an accompanying introduction explaining the syntax used.
A programmer who needs to implement a specific algorithm, especially an unfamiliar one, will often start with a pseudocode description, and then simply "translate" that description into the target programming language and modify it to interact correctly with the rest of the program.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details