Difference between revisions of "Statement (computer science)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Etc)
 
(imperative programming)
Line 1: Line 1:
In [[computer programming]], a '''statement''' is the smallest standalone element of an [[imperative programming language]] that expresses some action to be carried out.
+
In [[computer programming]], a '''statement''' is the smallest standalone element of an [[Imperative programming|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.
 
It is an instruction written in a high-level language that commands the computer to perform a specified action.
Line 17: Line 17:
 
== See also ==
 
== See also ==
  
* [[Imperative programming language]]
+
* [[Imperative programming]]
 
* [[Programming language]]
 
* [[Programming language]]
 
* [[Programming paradigm]]
 
* [[Programming paradigm]]

Revision as of 08:44, 18 August 2015

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, definitions, and expressions:

  • A statement only containing executable code.
  • A definition declaring an identifier.
  • An expression evaluates to a value only.

A distinction can also be made between simple and compound statements, with compound statements contain multiple statements as components.

See also

External links

  • [ ] @ Wikipedia