Home > lang > dec 
 fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
DEC
DEC Variable

Decrements a variable.

Variable can be any target of an assignment, but must be numeric.

It is the exact equivalent of

Variable = Variable - 1

or

Variable -= 1

Example

X = 7
DEC X
PRINT X

6

DIM A AS Float[3, 3]

X = 2
Y = 1

A[X, Y] = PI
DEC A[X, Y]
PRINT A[X, Y]

2.14159265359

See also

Arithmetical Functions, Assignment Operators, INC