IncrementValue

Increment the integer part of a number

Method Signature

IncrementValue(number=[numeric])

Arguments

Argument
Type
Required
Description
Default

number

numeric

true

The number to increment the integer part of.

Examples

Increment 7

Run Example

incrementValue( 7 );

Result: 8

Increment 7.5

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

Run Example

incrementValue( 7.5 );

Result: 8.5

Additional Examples

Run Example

num = 169;
writeDump( incrementvalue( num ) );
num = .59;
writeDump( incrementvalue( num ) );

Last updated

Was this helpful?