dec()
Decrements the passed integer variable by one and returns the decremented value.
Accordingly you may only pass script variables of type integer which are allowed
to modified (i.e. they may not be declared as const
).
Function Prototype
dec(variable)
Arguments
Argument Name | Data Type | Description |
---|---|---|
variable |
Integer Variable | The integer variable to be decremented by one. [required] |
Return Value
Data Type | Description |
---|---|
Integer Number | Value of the passed variable after the decrementation. |
Remarks
This functions accepts any standard unit and finalness for its argument variable
.
The return value's standard unit and finalness is identical to the passed variable
's one.
Examples
- on init
- declare $i
- message("inc(" & $i & ") = " & inc($i))
- message("inc(" & $i & ") = " & inc($i))
- message("inc(" & $i & ") = " & inc($i))
- message("dec(" & $i & ") = " & dec($i))
- message("dec(" & $i & ") = " & dec($i))
- message("dec(" & $i & ") = " & dec($i))
- end on
See also
inc()
Availability
Since LinuxSampler 2.0.0.svn15.
Document Updated: 2019-09-16 | Author: Christian Schoenebeck