Free Pascal - Decrement statement: dec

Decrement statement it is a mathematical operation that is used to decrease the number by one.

dec

Description


Input

Examples

Free Pascal

Even one example in what situations we can use the operation decrement statement:
i:=10;
repeat dec(i) until not i > 0;
repeat
  inc(i);
  if i=5 then
    break;
until not i <10;

Free Pascal

Even one example in what situations we can use the operation decrement statement:
repeat dec(i) until not i > 0;
dec(j);

Free Pascal

Other pieces of example codes:
if  x = 5 then
   dec(y);
while  y >= 0 do  
      dec(y)
repeat dec(i) until ( i = 0);
dec(i)
dec(y);
Languages: en hu cz sk