decrementValue

Decrements the integer part of a number.
same as x=x-1 or x--

decrementValue(number) → returns Numeric

Argument Reference for the decrementValue function

number

Required: Yes

Examples sample code invoking the decrementValue function


Decrement 7.5

There is a difference between CFML engines. ACF will return the integer decremented removing the decimal part. Lucee will decrement the integer part but return both.

decrementValue(7.5)

Expected Result: 6.5


Fork me on GitHub