Pascal - Assignment: :=

The assignment operator is used to assign a value to a variable. it can be used for any data type with the only condition that the first parameter (left side) must be a value receiver, for example a variable. depending on the programming language can be different terms for the assignment of values to the variables, for example depending on the type.

:=

Description

var :=expression;
Used keywords: :=

Input

Compatible programing languages:
Object Pascal | Free Pascal

Examples

Pascal

Assignment the possible of use:
x := 1.234;         { x = 1.234}
y := x * 3.14;      { y = 3.87476}
if y<5 then
   y := y/ 3.14;    

Pascal

Other pieces of example codes:
x := 250 div 8;
i :=10;
x := not(32 shr 2);
a3 := true and false;
a := 4 >= 2;
x := 10 * 5;
Languages: en hu cz sk