incrementValue

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

incrementValue(number) → returns numeric

Argument Reference

number numeric
Required

Compatibility

ColdFusion:

For floats ACF will return the integer incremented removing the decimal part

Lucee:

For floats Lucee will keep the decimal part while incrementing

Examples
Sample code invoking the incrementValue function

incrementValue(7)

Expected Result: 8

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)

Fork me on GitHub