Programming Language.
Publié le 11/05/2013
Extrait du document
«
Logic languages use logic as their mathematical base.
A logic program consists of sets of facts and if-then rules, which specify how one set of facts may be deducedfrom others, for example:
If the statement X is true, then the statement Y is false.
In the execution of such a program, an input statement can be logically deduced from other statements in the program.
Many artificial intelligence programs are writtenin such languages.
IV LANGUAGE STRUCTURE AND COMPONENTS
Programming languages use specific types of statements, or instructions, to provide functional structure to the program.
A statement in a program is a basic sentencethat expresses a simple idea—its purpose is to give the computer a basic instruction.
Statements define the types of data allowed, how data are to be manipulated, andthe ways that procedures and functions work.
Programmers use statements to manipulate common components of programming languages, such as variables andmacros (mini-programs within a program).
Statements known as data declarations give names and properties to elements of a program called variables.
Variables can be assigned different values within theprogram.
The properties variables can have are called types, and they include such things as what possible values might be saved in the variables, how much numericalaccuracy is to be used in the values, and how one variable may represent a collection of simpler values in an organized fashion, such as a table or array.
In manyprogramming languages, a key data type is a pointer.
Variables that are pointers do not themselves have values; instead, they have information that the computer canuse to locate some other variable—that is, they point to another variable.
An expression is a piece of a statement that describes a series of computations to be performed on some of the program’s variables, such as X + Y/Z, in which the variables are X, Y, and Z and the computations are addition and division.
An assignment statement assigns a variable a value derived from some expression, while conditional statements specify expressions to be tested and then used to select which other statements should be executed next.
Procedure and function statements define certain blocks of code as procedures or functions that can then be returned to later in the program.
These statements alsodefine the kinds of variables and parameters the programmer can choose and the type of value that the code will return when an expression accesses the procedure orfunction.
Many programming languages also permit minitranslation programs called macros.
Macros translate segments of code that have been written in a languagestructure defined by the programmer into statements that the programming language understands.
V HISTORY
Programming languages date back almost to the invention of the digital computer in the 1940s.
The first assembly languages emerged in the late 1950s with theintroduction of commercial computers.
The first procedural languages were developed in the late 1950s to early 1960s: Fortran (FORmula TRANslation), created by JohnBackus, and then COBOL (COmmon Business Oriented Language), created by Grace Hopper.
The first functional language was LISP (LISt Processing), written by JohnMcCarthy in the late 1950s.
Although heavily updated, all three languages are still widely used today.
In the late 1960s, the first object-oriented languages, such as SIMULA, emerged.
Logic languages became well known in the mid 1970s with the introduction ofPROLOG, a language used to program artificial intelligence software.
During the 1970s, procedural languages continued to develop with ALGOL, BASIC, PASCAL, C, andAda.
SMALLTALK was a highly influential object-oriented language that led to the merging of object-oriented and procedural languages in C++ and more recently inJAVA.
Although pure logic languages have declined in popularity, variations have become vitally important in the form of relational languages for modern databases,such as SQL (Structured Query Language).
Contributed By:Peter M.
KoggeMicrosoft ® Encarta ® 2009. © 1993-2008 Microsoft Corporation.
All rights reserved..
»
↓↓↓ APERÇU DU DOCUMENT ↓↓↓
Liens utiles
- PL/1 (Programming Language Number 1).
- Should we have one global language?
- LANGAGE ET LA PENSÉE (LE), Language and . Noam Chomsky - résumé de l'oeuvre
- Le language
- LANGUAGE AND SKILLS TEST