Search code examples
algorithmpseudocode

Type of pseudo code


First of all, sorry for this stupid question. But I really need to know about the languages which are used to show execution flow of program in computer science books.

Example:

 1   A = 4
 2   t1 = A * B
 3   L1: t2 = t1 / C
 4   if t2 < W goto L2
 5   M = t1 * k
 6   t3 = M + I
 7   L2: H = I
 8   M = t3 - H
 9   if t3 ≥ 0 goto L3
10   goto L1
11   L3: halt

Does this language have some specific standers? Is this a pseudo code or an intermediate form of code?


Solution

  • There are no technical rules for Pseudocode, unless you are attempting to conform to standards/syntax for a particular language.

    Pseudocode is meant to be human readable and still convey the flow and meaning of the code.

    Books that use Pseudocode typically conform to a Java, C, or Pascal-type (among others) structure to make the code easy to read for those familiar with the languages.

    The naming conventions that I have seen in the past usually lean toward C or Java-esque naming conventions.

    You can find more information here: http://en.wikipedia.org/wiki/Pseudocode