incrementValue

Increment the integer part of a number.
same as x=x+1 or x++

incrementValue(number) → returns Numeric

Argument Reference for the incrementValue function

number

Required: Yes

Examples sample code invoking the incrementValue function


Increment 7.5

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

incrementValue(7.5)

Expected Result: 8.5


Fork me on GitHub