Object Pascal - Statements

Statements are one step in the program.

statements


assignment The assignment operator is used to assign a value to a variable. it can be used for any data type with the onl...
loop with condition on the beginning Condition testing is done at the beginning of the loop. before each iteration the condition is tested, if it i...
conditional statement By conditions we can control our program. thanks conditional statement we can control program running in two d...
block statement A compound statement is also known as block. to connect more than one statement in a statement, eventually red...
loop with condition at the end until is false Condition testing is done at the end of the loop. after each iteration the condition is tested, if it is was t...
increment statement It is a mathematical operation that is used to increase the number by one.
decrement statement Decrement statement it is a mathematical operation that is used to decrease the number by one.

Object Pascal

Other pieces of example codes:
while y>1 do
begin
  inc(x);
  dec(y);
end;
if  x >= 12 then
   while  y >= 0 do  
      dec(y);
if x > 0 then // x == true
   x:=5;
if y < 100 then  
  inc(x);
repeat dec(i) until not i > 0;
i:=10;
Languages: en hu cz sk