Dec (procedure)

Language:
Русский
English

 Dec (procedure)


Decrements a variable.

Declaration

 procedure Dec(var X[ ; N: Longint]);

Target

Windows, Real, Protected

Remarks

X is an ordinal-type variable or a variable of type PChar if the extended syntax is enabled, and N is an integer-type expression. X is decremented by 1, or by N if N is specified; that is, Dec(X) corresponds to X := X - 1, and Dec(X, N) corresponds to X := X - N.

Dec generates optimized code and is especially useful in a tight loop.

See Also

 Inc
 Pred
 Succ

Sample Code

Тэги: Dec
| G+
Код для вставки: :: :: :: ::
Поделиться: // //