The dec procedure


The dec procedure decrements the value stored in a variable.


  1. The first parameter is a reference to the variable of ordinal type whose value is to be decremented.
  2. The second parameter is an expression of integral type, and is the value by which the variable is to be decremented. If this parameter is not supplied then the variable is decremented by one.


   dec(x)      decrements the variable "x" by 1
   dec(x, 10)  decrements the variable "x" by 10


Operating Systems: All
Standard Pascal: No