Pseudocode (derived from pseudo and code) is a description of a computer programming algorithm that uses the structural conventions of programming languages, but omits detailed subroutines or language-specific syntax. It can also refer to a high level 'language' whose aim is to generalise the logic and program flow of a computer program
In the context of the Short Code language, pseudocoding refer to the use of codes to represent assembly instructions, even though such codes could not be automatically compiled into an executable program. This usage has mostly fallen out of use. Flowcharts can be thought of as a graphical form of pseudocode.
Details not relevant to the algorithm (such as memory management code) are usually omitted, and the programming language will be augmented with natural language where convenient (for example, for trivial operations such as swapping two variables). Depending on the writer, pseudocode may therefore vary widely in style, from a near-exact imitation of a real programming language at one extreme, to a description approaching formatted prose at the other.
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.
Regular code (written in PHP):
Pseudocode: if credit card number is valid execute transaction based on number and order else show a generic failure message end if
Pseudocodi | Pseudocode | Pseudocódigo | Pseudo-code | 의사코드 | Pseudocodice | פסאודו קוד | Pszeudokód | Pseudocode | Pseudocódigo | Pseudokoodi | Pseudokod | 伪代码
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Pseudocode".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world