Difference between revisions of "Dec"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure Dec(var x); </source> ==Availability== SCAR Divi 3.00 > Current *Before SCAR Divi 3.12 the function was defined as: ...")
 
(Description)
 
Line 14: Line 14:
  
 
==Description==
 
==Description==
Decreases the value of a given integer variable '''x''' by 1. An extended function with additional functionality is available as [[DecEx]].
+
Decreases the value of a given [[integer]] variable '''x''' by 1. An extended function with additional functionality is available as [[DecEx]].
  
 
===Accepted Types (x)===
 
===Accepted Types (x)===

Latest revision as of 01:12, 3 July 2011

Definition

procedure Dec(var x);

Availability

SCAR Divi 3.00 > Current

  • Before SCAR Divi 3.12 the function was defined as:
procedure Dec(var i: Integer);
  • Before SCAR Divi 3.26 the function did not accept the data type Int64.

Description

Decreases the value of a given integer variable x by 1. An extended function with additional functionality is available as DecEx.

Accepted Types (x)

Example

var
  i: Integer;

begin
  i := 1;
  Dec(i);
  WriteLn(i);
end.

Output:

0

See Also