|
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 much the same way as the imperative mood in natural languages expresses commands to take action, imperative programs are a sequence of commands for the computer to perform. Computer science is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ...
Declarative programming is a term with two distinct meanings, both of which are in current use. ...
A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ...
In information processing, a state is the complete set of properties (for example, its energy level, etc. ...
A statement is the minimal unit of structuring in imperative programming languages. ...
In linguistics, many grammars have the concept of grammatical mood, which describes the relationship of a verb with reality and intent. ...
The term natural language is used to distinguish languages spoken and signed (by hand signals and facial expressions) by humans for general-purpose communication from constructs such as writing, computer-programming languages or the languages used in the study of formal logic, especially mathematical logic. ...
An illustration of a modern personal computer. ...
Imperative programming languages stand in contrast to other types of languages, such as functional and logical programming languages. Functional programming languages, such as Haskell, are not a sequence of statements and have no global state as imperative languages do. Logical programming languages, like Prolog, are often thought of as defining "what" is to be computed, rather than "how" the computation is to take place, as an imperative programming language does. Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. ...
Logic programming is a declarative programming paradigm in which a set of attributes that a solution should have are specified rather than set of steps to obtain such a solution. ...
Haskell is a standardized pure functional programming language with non-strict semantics named after the logician Haskell Curry. ...
Prolog is a logic programming language. ...
Overview
The hardware implementation of almost all computers is imperative; nearly all computer hardware is designed to execute machine code, which is native to the computer, written in the imperative style. From this low-level perspective, the program state is defined by the contents of memory, and the statements are instructions in the native machine language of the computer. Higher-level imperative languages use variables and more complex statements, but still follow the same paradigm. Recipes and process checklists, while not computer programs, are also familiar concepts that are similar in style to imperative programming; each step is an instruction, and the physical world holds the state. Since the basic ideas of imperative programming are both conceptually familiar and directly embodied in the hardware, most computer languages are in the imperative style. Machine code or machine language is a system of instructions and data directly understandable by a computers central processing unit. ...
In computer science and mathematics, a variable (sometimes called a pronumeral) is a symbol denoting a quantity or symbolic representation. ...
Since the late 1800s, the word paradigm (IPA: ) has referred to a thought pattern in any scientific discipline or other epistemological context. ...
An example recipe, printed from the Wikibooks Cookbook. ...
1. ...
The terms computer program, software program, applications program, system software, or just program are used to refer to either an executable program by both lay people and computer programmers or the collection of source code from which an executable program is created (eg, compiled). ...
Assignment statements, in general, perform an operation on information located in memory and store the results in memory for later use. High-level imperative languages, in addition, permit the evaluation of complex expressions, which may consist of a combination of arithmetic operations and function evaluations, and the assignment of the resulting value to memory. Looping statements allow a sequence of statements to be executed multiple times. Loops can either execute the statements they contain a predefined number of times, or they can execute them repeatedly until some condition changes. Conditional branching statements allow a block of statements to be executed only if some condition is met. Otherwise, the statements are skipped and the execution sequence continues from the statement following the block. Unconditional branching statements allow the execution sequence to be transferred to some other part of the program. These include the jump, called "goto" in many languages, and the subprogram, or procedure, call. Arithmetic is the current mathematics collaboration of the week! Please help improve it to featured article standard. ...
Partial plot of a function f. ...
Goto may mean: GOTO (also known as Goto or Go to) â a branching construct in programming languages, infamous for its role in unstructured dialects of BASIC Goto, Nagasaki â a Japanese city G0-T0 (note: the characters following the G and T, respectively, are zeros), alias his coverup identity of Goto...
A procedure is a series of activities, tasks, steps, decisions, calculations and other processes, that when undertaken in the sequence laid down produces the described result, product or outcome. ...
History The earliest imperative languages were the machine languages of the original computers. In these languages, instructions were very simple, which made hardware implementation easier, but hindered the creation of complex programs. FORTRAN, developed by John Backus at IBM starting in 1954, was the first major programming language to remove the obstacles presented by machine code in the creation of complex programs. FORTRAN was a compiled language that allowed named variables, complex expressions, subprograms, and many other features now common in imperative languages. The next two decades saw the development of a number of other major high-level imperative programming languages. In the late 1950s and 1960s, ALGOL was developed in order to allow mathematical algorithms to be more easily expressed, and even served as the operating system's target language for some computers. COBOL (1960) and BASIC (1964) were both attempts to make programming syntax look more like English. In the 1970s, Pascal was developed by Niklaus Wirth, and C was created by Dennis Ritchie while he was working at Bell Laboratories. Wirth went on to design Modula-2, Modula-3, and Oberon. For the needs of the United States Department of Defense, Jean Ichbiah and a team at Honeywell began designing Ada in 1974, a language which focuses on secure programming aspects, but did not complete the specification until 1983. Fortran (also FORTRAN) is a computer programming language originally developed in the 1950s; it is still used for scientific computing and numerical computation half a century later. ...
John Backus (born December 3, 1924) is an American computer scientist, notable as the inventor of the first high-level programming language (FORTRAN), the Backus-Naur form (BNF, the almost universally used notation to define formal language syntax), and the concept of Function-level programming. ...
International Business Machines Corporation (IBM, or colloquially, Big Blue) (NYSE: IBM) (incorporated June 15, 1911, in operation since 1888) is headquartered in Armonk, New York, USA. The company manufactures and sells computer hardware, software, and services. ...
1954 (MCMLIV) was a common year starting on Friday of the Gregorian calendar. ...
The 1950s were a decade that spanned the years 1950 through 1959. ...
The 1960s decade refers to the years from 1960 to 1969, inclusive. ...
ALGOL (short for ALGOrithmic Language) is a family of imperative computer programming languages originally developed in the mid 1950s which became the de facto standard way to report algorithms in print for almost the next 30 years. ...
An operating system (OS) is an essential software program that manages the hardware and software resources of a computer. ...
COBOL is a third-generation programming language. ...
BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ...
The 1970s decade refers to the years from 1970 to 1979, inclusive. ...
Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ...
Niklaus Wirth giving a lecture Niklaus E. Wirth (born February 15, 1934) is a Swiss computer scientist. ...
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the UNIX...
Ken Thompson (left) with Dennis Ritchie (right) Dennis MacAlistair Ritchie (born September 9, 1941) is a computer scientist notable for his influence on ALTRAN, B, BCPL, C, Multics, and Unix. ...
Bell Telephone Laboratories or Bell Labs was originally the research and development arm of the United States Bell System, and was the premier corporate facility of its type, developing a range of revolutionary technologies from telephone switches to specialized coverings for telephone cables, to the transistor. ...
Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, another language by him. ...
Modula-3 is a programming language conceived as a successor to an upgraded version of Modula-2. ...
Oberon is a reflective 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. ...
The United States Department of Defense, abbreviated as DoD or DOD and sometimes called the Defense Department, is a civilian Cabinet organization of the United States government. ...
Jean David Ichbiah (born 25 March 1940) was the chief designer of the Ada programming language, from 1977â1983. ...
Honeywell NYSE: HON is a major American multinational corporation that produces electronic control systems and automation equipment. ...
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. ...
1974 (MCMLXXIV) was a common year starting on Tuesday (the link is to a full 1974 calendar). ...
1983 (MCMLXXXIII) was a common year starting on Saturday of the Gregorian calendar. ...
The 1980s saw a rapid growth in interest in object-oriented programming. These languages were imperative in style, but added features to support objects. The last two decades of the 20th century saw the development of a considerable number of such programming languages. Smalltalk-80, originally conceived by Alan Kay in 1969, was released in 1980 by the Xerox Palo Alto Research Center. Drawing from concepts in another object-oriented language — Simula (which is considered to be the world's first object-oriented programming language, developed in the late 1960s) — Bjarne Stroustrup designed C++, an object-oriented language based on C. C++ was first implemented in 1985. In the late 1980s and 1990s, the notable imperative languages drawing on object-oriented concepts were Perl, released by Larry Wall in 1987; Python, released by Guido van Rossum in 1990; PHP, released by Rasmus Lerdorf in 1994; and Java, first released by Sun Microsystems in 1994. MacGyver is one of the symbols of the 1980s in America The 1980s decade refers to the years from 1980 to 1989, inclusive. ...
In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ...
An object is fundamental concept in object-oriented programming. ...
(19th century - 20th century - 21st century - more centuries) Decades: 1900s 1910s 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s As a means of recording the passage of time, the 20th century was that century which lasted from 1901–2000 in the sense of the Gregorian calendar (1900–1999 in the...
Smalltalk is a dynamically typed object oriented programming language designed at Xerox PARC by Alan Kay, Dan Ingalls, Ted Kaehler, Adele Goldberg, and others during the 1970s. ...
Alan Kay during an interview. ...
1969 (MCMLXIX) was a common year starting on Wednesday (the link is to a full 1969 calendar). ...
1980 (MCMLXXX) was a leap year starting on Tuesday. ...
Xerox Palo Alto Research Center (PARC) was a flagship research division of the Xerox Corporation, based in Palo Alto, California, USA. It was founded in 1970 and spun out as a separate company in 2002. ...
Simula is a programming language developed in the 1960s at the Norwegian Computing Centre in Oslo, by Ole-Johan Dahl and Kristen Nygaard. ...
An object-oriented programming language (also called an OO language) is one that allows or encourages, to some degree, object-oriented programming methods. ...
The 1960s decade refers to the years from 1960 to 1969, inclusive. ...
Bjarne Stroustrup Bjarne Stroustrup (born December 30, 1950 in Aarhus, Denmark) is a computer scientist and the College of Engineering Chair Professor of Computer Science at Texas A&M University. ...
C++ (generally pronounced see plus plus) is a general-purpose programming language. ...
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the UNIX...
C++ (generally pronounced see plus plus) is a general-purpose programming language. ...
This article is about the year. ...
MacGyver is one of the symbols of the 1980s in America The 1980s decade refers to the years from 1980 to 1989, inclusive. ...
The 1990s decade refers to the years from 1990 to 1999, inclusive. ...
Programming Republic of Perl logo Perl, also Practical Extraction and Report Language (a backronym, see below), is a programming language released by Larry Wall on December 18, 1987 that borrows features from C, sed, awk, shell scripting (sh), and (to a lesser extent) from many other programming languages. ...
Larry Wall (b. ...
1987 (MCMLXXXVII) was a common year starting on Thursday of the Gregorian calendar. ...
Python is an interpreted programming language created by Guido van Rossum in 1990. ...
Guido van Rossum is a computer programmer who is best-known as the author of the Python programming language. ...
This article is about the year. ...
PHP is a scripted programming language that can be used to create websites. ...
Rasmus Lerdorf (born November 22, 1968 in Qeqertarsuaq, Greenland) is a Danish-Canadian programmer and the author of the first version of the PHP web programming language. ...
1994 (MCMXCIV) was a common year starting on Saturday of the Gregorian calendar, and was designated the International year of the Family. ...
Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. ...
Sun Microsystems, Inc. ...
1994 (MCMXCIV) was a common year starting on Saturday of the Gregorian calendar, and was designated the International year of the Family. ...
Example languages The canonical examples of imperative programming languages are Fortran and Algol. Others include Pascal, C, and Ada. Fortran (also FORTRAN) is a statically typed, compiled, programming language originally developed in the 1950s and still heavily used for scientific computing and numerical computation half a century later. ...
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. ...
Pascal is one of the landmark computer programming languages on which generations of students cut their teeth and variants of which are still widely used today. ...
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a low-level standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the...
Ada is a structured, statically typed programming language, designed by Jean Ichbiah of Cii Honeywell Bull in the 1970s. ...
Category:Imperative programming languages provides an exhaustive list.
References - Pratt, Terrence W. and Marvin V. Zelkowitz. Programming Languages: Design and Implementation, 3rd ed. Englewood Cliffs, N.J.: Prentice Hall, 1996.
- Sebesta, Robert W. Concepts of Programming Languages, 3rd ed. Reading, Mass.: Addison-Wesley Publishing Company, 1996.
See also Originally based on the article 'Imperative programming' by Stan Seibert, from Nupedia, licensed under the GNU Free Documentation License. Declarative programming is a term with two distinct meanings, both of which are in current use. ...
A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ...
This article or section does not cite its references or sources. ...
Nupedia was a Web-based encyclopedia whose articles were written by experts and licensed as free content. ...
GNU logo (similar in appearance to a gnu) The GNU Free Documentation License (GNU FDL or simply GFDL) is a copyleft license for free content, designed by the Free Software Foundation (FSF) for the GNU project. ...
|