Pseudocode is generic way of describing an algorithm without use of any specific programming language-related notations. It is, as the name suggests, pseudo code. That is, it is not really programming code, but it models and may even look like programming code. Pseudocode, by nature, exists in various forms, though most borrow syntax from popular programming languages (like C, Lisp, or Fortran). Natural language text is used whenever details are unimportant or distracting.
Computer science text books 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 psuedocode style varies from author to author, there is usually an accompanying introduction explaining the syntax used.
Wikipedia's style of pseudocode uses keywords from C for the some common operations, and, like Python, uses indentation to distinguish the scope of things like loops. However, not all documents yet adhere to this standard.
Assignment:
Conditionals:
Simple loops:
Function calls:
Function declarations:
Variable declarations:
Array declarations:
Composite data structures (also see Object Oriented Programming):
Accessing fields of a composite structure:
This standard still needs work.Example Wikipedia pseudocode
if
do stuff
else
do other stuff
while
do stuff
for do stuff with variable
function
do stuff with arguments
return something (optional)
declare
declare
struct