FACTOID # 74: Members of the armed forces and the police cannot vote in the Dominican Republic.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

Encyclopedia > Procedural programming

Procedural programming is sometimes used as a synonym for imperative programming (specifying the steps the program must take to reach the desired state), but can also refer (as in this article) to a programming paradigm based upon the concept of the procedure call. Procedures, also known as routines, subroutines, methods, or functions (not to be confused with mathematical functions, but similar to those used in functional programming) simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself. Image File history File links Question_book-3. ... Procedural generation is a widely used term to indicate the possibility to create content on the fly, as opposed to creating it before distribution. ... In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ... In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code. ... Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. ...


Procedural programming is often a better choice than simple sequential or unstructured programming in many situations which involve moderate complexity or which require significant ease of maintainability. Possible benefits: Unstructured programming is a programming paradigm where all code is contained in a single continuous block. ...

  • The ability to re-use the same code at different places in the program without copying it.
  • An easier way to keep track of program flow than a collection of "GOTO" or "JUMP" statements (which can turn a large, complicated program into spaghetti code).
  • The ability to be strongly modular or structured.

Contents

A plate of spaghetti looks twisted and tangled, which is where the name for spaghetti code comes from. ... Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ...

Procedures and modularity

Especially in large, complicated programs, modularity is generally desirable. Inputs are usually specified syntactically in the form of arguments and the outputs delivered as return values. Modularity is a concept that has applications in the contexts of computer science, particularly programming, as well as cognitive science in investigating the structure of mind. ...


Scoping is another technique that helps keep procedures strongly modular. It prevents the procedure from accessing the variables of other procedures (and vice-versa), including previous instances of itself, without explicit authorization.


Less modular procedures, often used in small or quickly written programs, tend to interact with a large number of variables in the execution environment, which other procedures might also modify. In computer science and mathematics, a variable (pronounced ) (sometimes called an object or identifier in computer science) is a symbolic representation used to denote a quantity or expression. ...


Because of the ability to specify a simple interface, to be self-contained, and to be reused, procedures are a convenient vehicle for making pieces of code written by different people or different groups, including through programming libraries. In computer science, a library is a collection of subprograms used to develop executables in that they are not independent programs; rather, they are helper code that provides services to some other independent program. ...


(See Module (programming) and Software package.) It has been suggested that this article or section be merged into Modularity (programming). ... A software package is a bundle of one or several files that either are necessary for the execution of a computer program, or add features for a program already installed on the computer or network of computers. ...


Comparison with imperative programming

Most or all existent procedural programming languages are also imperative languages, because they make explicit references to the state of the execution environment. This could be anything from variables (which may correspond to processor registers) to something like the position of the "turtle" in the Logo programming language (which could be anything from a cursor on the screen to an actual device which moves around on the floor of a room). In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... In computer architecture, a processor register is a small amount of very fast computer memory used to speed the execution of computer programs by providing quick access to frequently used values—typically, these values are involved in multiple expression evaluations occurring within a small region on the program. ... Logo turtle graphic The Logo programming language is a functional programming language. ...


Comparison with object-oriented programming

The focus of procedural programming is to break down a programming task into a collection of data structures and subroutines, whereas in object oriented programming it is to break down a programming task into objects. Either method can be valid for accomplishing a specific programming task. (Object orientation is often referred to as OO and object oriented programming as OOP.) A binary tree, a simple type of branching linked data structure. ... 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. ... Object-oriented programming (OOP) is a computer programming paradigm in which a software system is modeled as a set of objects that interact with each other. ... In strictly mathematical branches of computer science the term object is used in a purely mathematical sense to refer to any thing. While this interpretation is useful in the discussion of abstract theory, it is not concrete enough to serve as a primitive datatype in the discussion of more concrete...


The most popular programming languages usually have both OOP and procedural aspects.


Some differences between pure object-oriented languages and non-OO procedural languages:

pure OO pure procedural
methods functions
objects modules
message call
attribute variable

Suyeb


Comparison with logic programming

In logic programming, a program is a set of premises, and computation is performed by attempting to prove candidate theorems. From this point point of view, logic programs are declarative, focusing on what the problem is, rather than on how to solve it. Logic programming (which might better be called logical programming by analogy with mathematical programming and linear programming) is, in its broadest sense, the use of mathematical logic for computer programming. ... A declaration is a form of statement, which expresses (or declares) some idea; declarations attempt to argue that something is true. ...


However, the backward reasoning technique, implemented by SLD resolution, used to solve problems in logic programming languages such as Prolog, treats programs as goal-reduction procedures. Thus clauses of the form: Backward reasoning (or goal-oriented inference) is an inference method used in artificial intelligence. ... In logic programming, SLD resolution is an algorithm for mechanically proving statements of first-order logic from a set of Horn clauses; particularly, linear resolution with a selection function for definite sentences. ... Prolog is a logic programming language. ...

H :- B1, …, Bn.

have a dual interpretation, both as procedures

to show/solve H, show/solve B1 and … and Bn

and as logical implications:

B1 and … and Bn implies H.

Experienced logic programmers use the procedural interpretation to write programs that are effective and efficient, and they use the declarative interpretation to help ensure that programs are correct.


Procedural programming languages

To be considered procedural, a programming language should support procedural programming by having an explicit concept of a procedure, and a syntax to define it. The canonical example of a procedural programming language is ALGOL. ALGOL (short for ALGOrithmic Language) is a programming language originally developed in the mid 1950s which became the de facto standard way to report algorithms in print for almost the next 30 years. ...


Languages in which the only form of procedure is a method are generally considered object-oriented rather than procedural, and are not included in this list. This applies, in particular, to C# and Java. In object-oriented programming, the term method refers to a subroutine that is exclusively associated either with a class (called class methods, static methods, or factory methods) or with an object (called instance methods). ... The title given to this article is incorrect due to technical limitations. ... Java language redirects here. ...


Languages, like Prolog and its variants, which are both declarative and procedural, are also not included. Prolog is a logic programming language. ...

Ada is a structured, statically typed imperative computer programming language designed by a team led by Jean Ichbiah of CII Honeywell Bull during 1977–1983. ... ALGOL (short for ALGOrithmic Language) is a programming language originally developed in the mid 1950s which became the de facto standard way to report algorithms in print for almost the next 30 years. ... Active Server Pages (ASP) is Microsofts server-side script engine for dynamically-generated web pages. ... BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... 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. ... This article or section does not adequately cite its references or sources. ... COBOL (pronounced //) is a Third-generation programming language, and one of the oldest programming languages still in active use. ... Component Pascal is a programming language in the tradition of Oberon and Oberon-2, the last language Niklaus Wirth designed before he retired in 1999. ... D is an object-oriented, imperative system programming language designed by Walter Bright of Digital Mars as a re-engineering of C/C++. He has done this by re-designing many C++ features, and borrowing ideas from other programming languages. ... Delphi is the primary programming language of Borland Delphi. ... ECMAScript is a scripting programming language, standardized by Ecma International in the ECMA-262 specification. ... ActionScript is a scripting language based on ECMAScript, used primarily for the development of websites and software using the Adobe Flash Player platform (in the form of SWF files embedded into Web pages). ... The DMDScript programming language is Digital Mars implementation of the ECMAScript engine, and thus, scripting language. ... JavaScript is a scripting language most often used for client-side web development. ... JScript is the Microsoft implementation of the ECMAScript scripting programming language specification. ... This article is about the Visual Basic language shipping with Microsoft Visual Studio 6. ... Forth is a programming language and programming environment, initially developed by Charles H. Moore at the US National Radio Astronomy Observatory in the early 1970s. ... Fortran (previously FORTRAN[1]) is a general-purpose[2], procedural,[3] imperative programming language that is especially suited to numeric computation and scientific computing. ... F is a compiled, structured, array programming language especially well suited to education and scientific computing. ... Lasso Professional combines an interpreted middleware programming language and server for developing internet applications which use web browsers for the client user interface to connect to HTTP and database servers. ... A diagram is needed here to show a scaled-down version of the L.In. ... Maple 9. ... For other uses, see Mathematica (disambiguation). ... Not to be confused with Matlab Upazila in Chandpur District, Bangladesh. ... Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, an intermediate language by him. ... Oberon is a programming language created in the late 1980s by Professor Niklaus Wirth (creator of the Pascal, Modula and Modula-2 programming languages) and his associates at ETHZ in Switzerland. ... Occam is a parallel programming language that builds on Communicating Sequential Processes (CSP) and shares many of their features. ... For other uses of the word MUMPS, see Mumps (disambiguation). ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ... Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... For other uses, see PHP (disambiguation). ... PL/C is a large subset of IBMs PL/I language, designed in the early 1970s at Cornell University. ... Python is a high-level programming language first released by Guido van Rossum in 1991. ... PL/I (Programming Language One, pronounced pee el one) is an imperative computer programming language designed for scientific, engineering, and business applications. ... Rapira (Russian Рапира, rapier) is an educational procedural programming language developed in the USSR. It was an interpreted language with dynamic type system and high level constructions. ... RPG is a native programming language for IBMs iSeries servers - the latest generation of midrange servers which included System/38, System/36, AS/400, iSeries and System i5 systems. ... VBScript (short for Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft. ...

List of Popular Software written using Procedural Programming

System Software

The Linux kernel is a Unix-like operating system kernel. ...

Games

Doom (or DOOM)[1] is a 1993 computer game by id Software that is a landmark title in the first-person shooter genre. ... The cover artwork for Doom II, painted by fantasy artist Gerald Brom, depicts the Doom space marine firing a shotgun at a gigantic Cyberdemon. ... Zombies attacking the player at the starting of Episode 1, Mission 3: The Necropolis. ... Quake II, released on December 6, 1997, is a first person shooter computer game developed by id Software and distributed by Activision. ... Quake III Arena or Quake 3, abbreviated as Q3A or Q3, is a multiplayer first-person shooter computer and video game released on December 2, 1999. ...

Emulators

ZSNES is an emulator of the Super Famicom and SNES video game systems. ... MAME is an emulator application designed to recreate the hardware of arcade game systems in software, with the intent of preserving gaming history and preventing vintage games from being lost or forgotten. ... fMSX is a portable MSX emulator written by Marat Fayzullin, one of the pioneers of modern computer emulation. ...

Applications

The Apache HTTP Server, commonly referred to simply as Apache, is a web server notable for playing a key role in the initial growth of the World Wide Web. ... PostgreSQL is a free software object-relational database management system (ORDBMS), released under a BSD-style license. ... Python is an interpreted programming language created by Guido van Rossum in 1990. ... Ruby is a reflective, object-oriented programming language. ... Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... For other uses, see PHP (disambiguation). ... Samba is a free software re-implementation of SMB/CIFS networking protocol, released under the GNU General Public License. ...

See also

Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. ... In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... Logic programming (which might better be called logical programming by analogy with mathematical programming and linear programming) is, in its broadest sense, the use of mathematical logic for computer programming. ... Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design applications and computer programs. ... A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... Procedural generation is a widely used term to indicate the possibility to create content on the fly, as opposed to creating it before distribution. ... Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ...

External links


  Results from FactBites:
 
Bona Fide Reviews - Procedural Programming: The Secret behind Spore Article (1560 words)
If anybody ever runs across this article when doing searches for procedural programming, please understand this article is full of inaccurate and misleading information and you should discard the information presented here and continue your search elsewhere, or feel free to verify my statement through your own research.
Procedural programming is like Visual Basic using SUBs which is obviously nothing ground-breaking and also results in not-so-amicable "Spaghetti-code".
But he has mixed in procedural and object orientated programming, indicating he misunderstands things somewhat as procedural generation could be used in both paradigms.
eXtropia | Tutorials | Introducton to Web Programming | Procedural Programming (175 words)
In the 1970's procedural-based programming was all the rage.
You should be very familiar with procedural-based programming since we spent all day yesterday going over Perl, which is very much a procedural-based programming language.
In a procedural-based programming language, a programmer writes out instructions that are followed by a computer from start to finish.
  More results at FactBites »

 

COMMENTARY     


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


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.