Software Statement
(Redirected from Statement (Programming))
Jump to navigation
Jump to search
A Software Statement is a formal statement that abides by a programming language.
- Context:
- It can (typically) be a Software Program Statement (within a software program).
- It can range from being an Imperative Programming Statement to being a Declarative Programming Statement.
- It can (often) reference a Software Variable and a Software Operator.
- Example(s):
- An Imperative Programming Statement, such as:
do { println(x); x += 1} while (x < 5)
, a Scala statement. - A Declarative Programming Statement, such as:
SELECT col2 AS age, COUNT(*) FROM table GROUP BY col2
, a SQL SELECT statement. - a Scala statement, Python Statement, Perl Statement, ...
- a Software Proposition, such as a software assertion.
- a Conditional Software Expression.
- …
- An Imperative Programming Statement, such as:
- Counter-Example(s):
- See: Pseudocode, Software Expression Side Effect, Software Function, Order of Operations, Software State, Expression (Programming), Side Effect (Programming).
References
- https://scholar.google.com/scholar?q="a+programming+statement"
2015
- (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/Statement_(computer_science) Retrieved:2015-8-17.
- In computer programming a statement is the smallest standalone element of an imperative programming language that expresses some action to be carried out. It is an instruction written in a high-level language that commands the computer to perform a specified action. A program written in such a language is formed by a sequence of one or more statements. A statement may have internal components (e.g., expressions). Many languages (e.g. C) make a distinction between statements and definitions, with a statement only containing executable code and a definition declaring an identifier, while an expression evaluates to a value only. A distinction can also be made between simple and compound statements; the latter may contain statements as components.
2012
- (Wikipedia, 2009) ⇒ http://en.wikipedia.org/wiki/Statement_%28programming%29
- In computer programming a statement is the smallest standalone element of an imperative programming language. A program written in such a language is formed by a sequence of one or more statements. A statement will have internal components (e.g., expressions).
Many languages (e.g. C) make a distinction between statements and definitions, with a statement only containing executable code and a definition declaring an identifier. A distinction can also be made between simple and compound statements; the latter may contain statements as components.
- In computer programming a statement is the smallest standalone element of an imperative programming language. A program written in such a language is formed by a sequence of one or more statements. A statement will have internal components (e.g., expressions).
2009
- (Wikipedia, 2009) ⇒ http://en.wikipedia.org/wiki/Statement_%28programming%29
- The following are the major generic kinds of statements with examples in typical imperative languages:
- assignment:
A:= A + 1
- call:
CLEARSCREEN()
- return:
return 5;
- goto:
goto 1
- assertion:
assert(ptr != NULL);
- block:
begin integer NUMBER; WRITE('Number? '); READLN(NUMBER); A:= A*NUMBER end
- if-statement:
if A > 3 then WRITELN(A) else WRITELN("NOT YET"); end
- switch-statement:
switch (c) { case 'a': alert(); break; case 'q': quit(); break; }
- while-loop:
while NOT EOF DO begin READLN end
- do-loop:
do { computation(&i); } while (i < 10);
- for-loop:
for A:=1 to 10 do WRITELN(A) end
- assignment:
- The following are the major generic kinds of statements with examples in typical imperative languages: