FACTOID # 63: Brazil takes up 47.8% of South America.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Pseudocode" also viewed:
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Pseudocode

Pseudocode (derived from pseudo and code) is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but typically omits details that are not essential for the understanding of the algorithm, such as subroutines, variable declarations and system-specific code. The programming language is augmented with natural language descriptions of the details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it may be easier for humans to read than conventional programming languages, and that it may be a compact and environment-independent description of the key principles of an algorithm. No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program. In communications, a code is a rule for converting a piece of information (for example, a letter, word, or phrase) into another form or representation, not necessarily of the same type. ... Programming redirects here. ... Flowcharts are often used to graphically represent algorithms. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... In computer science, a subroutine (function, procedure, or subprogram) is a sequence of code which performs a specific task, as part of a larger program, and is grouped as one, or more, statement blocks; such code is sometimes collected into software libraries. ... In computer science and mathematics, a variable is a symbol denoting a quantity or symbolic representation. ... In the philosophy of language, a natural language (or ordinary language) is a language that is spoken, written, or signed by humans for general-purpose communication, as distinguished from formal languages (such as computer-programming languages or the languages used in the study of formal logic, especially mathematical logic) and...


Flowcharts can be thought of as a graphical alternative to pseudocode. Pseudocode resembles, but should not be confused with, skeleton programs including dummy code, which can be compiled without errors. A flowchart that a member of the Wikipedia community could use for guidance when dealing with a difficult editor. ... Skeleton programming is a style of parallel programming based on simple high-level patterns. ... In computer programming, dummy code is inserted in a program skeleton to simulate processing and avoid compilation error messages. ... A diagram of the operation of a typical multi-language, multi-target compiler. ...

Contents

Syntax

As the name suggests, pseudocode generally does not actually obey the syntax rules of any particular language; there is no systematic standard form, although any particular writer will generally borrow the appearance of a particular language. Popular sources include Pascal, BASIC, C, Java, Lisp, and ALGOL. Details not relevant to the algorithm (such as memory management code) are usually omitted. Blocks of code, for example code contained within a loop, may be described in a one-line natural language sentence. For other uses, see Syntax (disambiguation). ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ... This article is about the programming language. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... Java language redirects here. ... Lisp is a family of computer programming languages with a long history and a distinctive fully-parenthesized syntax. ... It has been suggested that ALGOL object code be merged into this article or section. ... Memory management is the act of managing computer memory. ...


Depending on the writer, pseudocode may therefore vary widely in style, from a near-exact imitation of a real programming language at one extreme, to a description approaching formatted prose at the other.


Application

Textbooks and scientific publications related to computer science and numerical computation often use pseudocode in description of algorithms, so that all programmers can understand them, even if they do not all know the same programming languages. In textbooks, there is usually an accompanying introduction explaining the particular conventions in use. The level of detail of such languages may in some cases approach that of formalized general-purpose languages — for example, Knuth's seminal textbook The Art of Computer Programming describes algorithms in a fully-specified assembly language for a non-existent microprocessor. Scientific literature is the totality of publications that report original empirical and theoretical work in the sciences and social sciences. ... Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ... Numerical analysis is the study of algorithms for the problems of continuous mathematics (as distinguished from discrete mathematics). ... Donald Ervin Knuth ( or Ka-NOOTH[1], Chinese: [2]) (b. ... Cover of books The Art of Computer Programming[1] is a comprehensive monograph written by Donald Knuth which covers many kinds of programming algorithms and their analysis. ... See the terminology section, below, regarding inconsistent use of the terms assembly and assembler. ... A microprocessor incorporates most or all of the functions of a central processing unit (CPU) on a single integrated circuit (IC). ...


A programmer who needs to implement a specific algorithm, especially an unfamiliar one, will often start with a pseudocode description, and then simply "translate" that description into the target programming language and modify it to interact correctly with the rest of the program. Programmers may also start a project by sketching out the code in pseudocode on paper before writing it in its actual language, as a top-down structuring approach. A programmer or software developer is someone who programs computers, that is, one who writes computer software. ... Top-down and Bottom-up are approaches to the software development process, and by extension to other procedures, mostly involving software. ...


Examples of pseudocode

An example of how pseudocode differs from regular code is below.

Regular code (written in PHP):
 <?php if (is_valid($cc_number)) { execute_transaction($cc_number, $order); } else { show_failure(); } ?> 
Pseudocode:
 if credit card number is valid then execute transaction based on number and order else show a generic failure message end if 

The pseudocode of the Hello world program is particularly simple: For other uses, see PHP (disambiguation). ... A hello world program is a computer program that prints out Hello, World! on a display device. ...

 output: Hello World 

Mathematical style pseudocode

In numerical computation, pseudocode often consists of mathematical notation, typically from set and matrix theory, mixed with the control structures of a conventional programming language, and perhaps also natural language descriptions. This is a compact and often informal notation that can be understood by a wide range of mathematically trained people, and is frequently used as a way to describe mathematical algorithms. Numerical analysis is the study of algorithms for the problems of continuous mathematics (as distinguished from discrete mathematics). ... The term notation can be used in several contexts. ... Set theory is the mathematical theory of sets, which represent collections of abstract objects. ... In mathematics, a matrix (plural matrices) is a rectangular table of elements (or entries), which may be numbers or, more generally, any abstract quantities that can be added and multiplied. ... In the philosophy of language, a natural language (or ordinary language) is a language that is spoken, written, or signed by humans for general-purpose communication, as distinguished from formal languages (such as computer-programming languages or the languages used in the study of formal logic, especially mathematical logic) and... Flowcharts are often used to graphically represent algorithms. ...


Normally non-ASCII typesetting is used for the mathematical equations, for example by means of TeX or MathML markup, or proprietary formula editors. Image:ASCII fullsvg There are 95 printable ASCII characters, numbered 32 to 126. ... This article or section is in need of attention from an expert on the subject. ... TeX (IPA: as in Greek, often in English; written with a lowercase e in imitation of the logo) is a typesetting system created by Donald Knuth. ... Mathematical Markup Language (MathML) is an application of XML for describing mathematical notations and capturing both its structure and content. ... A formula editor is a name for a computer program that is used to typeset mathematical works or formulae. ...


Mathematical style pseudocode is sometimes referred to as pidgin code, for example pidgin ALGOL (the origin of the concept), pidgin Fortran, pidgin BASIC, pidgin Pascal, and pidgin C. In numerical computation, Pidgin code, for example Pidgin Algol, Pidgin Pascal and Pidgin C, refers to mathematical style pseudocode. ... It has been suggested that ALGOL object code be merged into this article or section. ... Fortran (previously FORTRAN[1]) is a general-purpose[2], procedural,[3] imperative programming language that is especially suited to numeric computation and scientific computing. ... This article is about the programming language. ... Pascal is a structured imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ...


Machine compilation or interpretation

It is often suggested that future programming languages will be more similar to pseudocode or natural language than to present-day languages; the idea is that increasing computer speeds and advances in compiler technology will permit computers to create programs from descriptions of algorithms, instead of requiring the details to be implemented by a human. In the philosophy of language, a natural language (or ordinary language) is a language that is spoken, written, or signed by humans for general-purpose communication, as distinguished from formal languages (such as computer-programming languages or the languages used in the study of formal logic, especially mathematical logic) and...


Natural language grammar in programming languages

Various attempts to bring elements of natural language grammar into computer programming have produced programming languages such as HyperTalk, Lingo, AppleScript, SQL and Inform. In these languages, parentheses and other special characters are replaced by prepositions, resulting in quite talkative code. This may make it easier for a person without knowledge about the language to understand the code and perhaps also to learn the language. However, the similarity to natural language is usually more cosmetic than genuine. The syntax rules are just as strict and formal as in conventional programming, and do not necessarily make development of the programs easier. HyperTalk is a high-level programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computers HyperCard hypermedia program by Bill Atkinson. ... The name Lingo has been used by several unrelated programming languages. ... AppleScript is a scripting language devised by Apple, Inc. ... SQL (IPA: or ) is a computer language designed for the retrieval and management of data in relational database management systems, database schema creation and modification, and database object access control management. ... Inform is a programming language and design system for interactive fiction originally created in 1993 by Graham Nelson. ...


Mathematical programming languages

An alternative to using mathematical pseudocode (involving set theory notation or matrix operations) for documentation of algorithms is to use a formal mathematical programming language that is a mix of non-ASCII mathematical notation and program control structures. Then the code can be parsed and interpreted by a machine.


Several formal specification languages include set theory notation using special characters. Examples are: A specification language is a formal language used in computer science. ...

Some array programming languages include vectorized expressions and matrix operations as non-ASCII formulas, mixed with conventional control structures. Examples are: The Z notation (universally pronounced zed, named after Zermelo-Fränkel set theory) is a formal specification language used for describing and modelling computing systems. ... The Vienna Development Method (VDM) is one of the longest-established Formal Methods for the development of computer-based systems. ... Array programming languages (also known as vector or multidimensional languages) generalize operations on scalars to apply transparently to vectors, matrices, and higher dimensional arrays. ...

APL (for A Programming Language) is an array programming language based on a notation invented in 1957 by Kenneth E. Iverson while at Harvard University. ... APLX is a modern, second generation, cross-platform dialect of the APL programming language. ... A+ is a powerful and efficient array programming language written at Morgan Stanley. ... Mathcad (originally written MathCAD) is desktop software for performing and documenting engineering and scientific calculations. ...

See also

This article does not cite any references or sources. ... In computer programming, dummy code is inserted in a program skeleton to simulate processing and avoid compilation error messages. ... In numerical computation, Pidgin code, for example Pidgin Algol, Pidgin Pascal and Pidgin C, refers to mathematical style pseudocode. ... Skeleton programming is a style of computer programming based on simple high-level program structures and dummy code. ... // Structure English is the marriage of English language with the syntax and structured programming. ...

External links

  • A pseudocode standard
  • Pseudocode Guidelines, PDF file.
  • Pseudocode Programming Process base on data from Code Complete book

  Results from FactBites:
 
pseudocode: Definition and Much More from Answers.com (790 words)
Pseudocode (derived from pseudo and code) is a description of a computer programming algorithm that uses the structural conventions of programming languages, but omits detailed subroutines or language-specific syntax.
As the name suggests, pseudocode generally does not actually use the syntax of any particular language; there is no systematic standard form, although any particular writer will generally borrow the appearance of a particular language.
It is often suggested that future programming languages will be more similar to pseudocode or natural language than to present-day languages; the idea is that increasing computer speeds and advances in compiler technology will permit computers to create programs from descriptions of algorithms, instead of requiring the details to be implemented by a human.
Pseudocode (143 words)
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.
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.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.