In computer programming, a statement is a single line of code that performs a specific task. For example, the following line of programming code from the Perl programming language is an example of a statement.

$a = 3;

In this example statement, a variable ($a) is assigned the value of “3” that is stored as a string. This type of statement is known as an assignment statement because a value is being assigned to a variable.

Condition, Conditional statement, Control flow, If statement, Input/output statement, Programming terms

A complete program has several statements that allow it to do more than assign a variable.

  • How to create a computer program.