Information about Expression Oriented Programming Languages

An expression-oriented programming language is a programming language where (nearly) every construction is an expression and yields a value. Macro definitions, preprocessor commands, and declarations are often treated as statements in expression-oriented languages. Some expression-oriented languages introduce a void return type to be yielded by expressions that have only side-effects.

ALGOL 68 is an example of an expression-oriented language. Pascal is not. All functional programming languages are expression-oriented.

Expression-orientation can be confusing in imperative programming languages, as many commands used normally as statements are in fact expressions. For example, assignment in the C programming language is an expression, not a statement. This allows for the following confusion: if (x = 1) { ... } else { /* this branch is never executed */ } The condition of the if is the result of the expression x = 1, which is 1. Thus the if will always execute the true branch. The above is often confused with: if (x == 1) { ... /* executed if x is 1 */ } else { ... /* executed if x is not 1 */ } For this reason, many programmers write the constant first in conditionals, as 1 = x is a syntax error, and mistyping = for

will not result in a bug.

A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languagess, are defined by syntactic and semantic rules which describe their structure and meaning respectively.
..... Click the link for more information.
An expression in a programming language is a combination of values, variables, operators, and functions that are interpreted (evaluated) according to the particular rules of precedence and of association for a particular programming language, which computes and then
..... Click the link for more information.
''For other uses, see Macro (disambiguation)


A macro in computer science is a rule or pattern that specifies how a certain input sequence (often a sequence of characters) should be mapped to an output sequence (also often a sequence of characters) according
..... Click the link for more information.
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers.
..... Click the link for more information.
In computer programming a statement can be thought of as the smallest standalone element of an imperative programming language. A program is formed by a sequence of one or more statements. A statement will have internal components (eg, expressions).
..... Click the link for more information.
The void type, in several programming languages derived from C and Algol68, is the type for the result of a function that produces no direct result. Usually such functions are called for their side effects, much like subroutines in Visual Basic and procedures in Pascal.
..... Click the link for more information.
ALGOL 68

Paradigm: multi-paradigm: concurrent • imperative
Appeared in: 1968, last revised 1973
Designed by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster, et al.
..... Click the link for more information.
Pascal is a structured imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. A derivative known as Object Pascal was designed for object oriented programming.
..... Click the link for more information.
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the imperative programming style that emphasizes changes in state.
..... Click the link for more information.
In computer science, imperative programming, as contrasted with declarative programming, is a programming paradigm that describes computation as statements that change a program state.
..... Click the link for more information.
C

The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.


In computer science a syntax error ( IPA: /ˈsɪntæks ɛrə(ɹ)/ ) refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter