community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Pseudocode


Message boards   Post comment

Pseudocode

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.

Example Wikipedia pseudocode

Assignment:

 = 

Conditionals:

if 
  do stuff
else
  do other stuff

Simple loops:

while 
  do stuff

for from to by do stuff with variable

Function calls:

()

Function declarations:

function ()
  do stuff with arguments
  return something (optional)

Variable declarations:

declare  as 

Array declarations:

declare [ to ] of 

Composite data structures (also see Object Oriented Programming):

struct 
  

Accessing fields of a composite structure:

.

This standard still needs work.

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

Pseudocode
knighthunter - September 15th, 2006
more information about pseudocode
read more »       messages 1
 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Pseudocode".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.