Pseudocode
Flowcharting
Pseudocode can almost be classified as half-code, half-text. Even as its name implies, it is semi-code. It is used by a programmer to outline the algorithms he or she has written, before they are actually translated into code. It is almost a high-level abstraction of code. For the most part, an algorithm to perform the same task in multiple programming languages is the same. The following is an example of pseudocode to ask the computer to input two numbers, and then print out their sum:
[indent]input A
input B
C = A + B
print C
[/indent]Using Functions
Pseudocode can also be used to interact between functions. By writing our your algorithm in such a way, not only can you easily convert it to any language you choose. It is also much easier to debug (fix) logic errors. Logic errors are those where the entire process being used from point A to point B is not rational or it doesn't work. Using pseudocode to pass variables in and out of functions can enormously help you, especially by using it as a reference guide when writing the code, itself.
cscgal
The Queen of DaniWeb
19,424 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 230
thats not pseudocode, looks more like BASIC to me!
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
it could be argued that the original intent of BASIC was to have a language that could more or less work on pseudocode.
As to conditional and assignment operators, it's all what you're used to.
I've been using C and Java for so long I find myself using == outside sourcecode to indicate comparison as well.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
You forgot to include your spam-link.
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403