~ Office Supplies ~~ Buy Posters ~~ A-Z Products ~~ Website Advertising


Pseudocode - Wikipedia

<<Up     Contents

Pseudocode

Pseudocode is a generic way of depicting algorithms without use of any specific programming language-related notations.

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.

Various styles of pseudocode are in use. Often pseudocode uses the syntax of one common language (like C or Lisp) for common operations like loops, and uses English language text whenever details are unimportant or distracting.

Our 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.

Example operations

Assignment:

<variable> = <expression>

Conditionals:

if <condition>
  do stuff
else
  do other stuff

Simple loops:

while <condition>
  do stuff

for <variable> from <first value> to <last value> by <step>
  do stuff with variable

Function calls:

<function>(<arguments>)

Function declarations:

function <function name>(<arguments>)
  do stuff with arguments
  return something (optional)

Variable declarations:

declare <variable-name> as <type>

Array declarations:

declare <array-name>[<lower-bound> to <upper-bound>] of <type>

Composite data structures (also see Object Oriented Programming):

struct <name_of_new_type>
  <declaration(s) of internal variables>

Accessing fields of a composite structure:

<structure variable name>.<field name>

This standard still needs work.

wikipedia.org dumped 2003-03-17 with terodump




 
 
15 gram blue Calcite gem stone chunk Cab cabbing cabochon gemstone lapidary cabachon rough 79 carats
 15 gram blue Calcite chunk Cab cabbing cabochon lapidary cabachon 79 carats 
 
WHITE Clear Quartz jewel Loose natural faceted cut polished jewelry gemstone 7x5 mm ov rutile single
 WHITE Clear Quartz jewel Loose ed cut polished jewelry 7x5 mm ov rutile single 
 
65 gr Arizona pink red yellow PETRIFIED WOOD Cab lapidary rough tumble polished cabbing gemstone lot
 65 gr Arizona pink red yellow PETRIFIED WOOD Cab lapidary tumble polished cabbing lot 
 
6 carat pink Rhodonite gem Polished rectangle block Cabbing cab cabochon rough gemstone single stone
 6 carat pink Rhodonite Polished rectangle block Cabbing cab cabochon single  
 
Orange SUNSTONE Feldspar gem stone polished gems 8x6 mm jewelry gemstone 8x6mm pair cabs NICE D
 Orange SUNSTONE Feldspar polished 8x6 mm jewelry 8x6mm pair cabs NICE D