Incremental Float Value Function

The incremental function $IncFloat has two forms.
In the first form it has the following parameters:

  1. (optional) Initial value*. Numeric, default is 1.0
  2. (optional) Step*. Numeric, default is 1.0
  3. (optional) Format. String, default is '{0}' for .net edition of the library, '%f' for Win32, Java and Web editions.
  4. (optional) Sequence border*, the function backs to the first value if the current value greater than this parameter. Float. "No cycle" or 0 by default.
  5. (optional) Reuse counter*. Integer, default is 1. How many times the engine should return each generated value.

* - the function call (like $Pattern) is acceptable instead of constant value for: 'Initial value', 'Step', 'Cycle length' and 'Reuse counter'. Performance warning: it can work a few times slowly for some cases.


  1. $IncFloat() - same as $IncFloat(1.0,1.0). Output: 1.0,2,0,3.0,4.0,...
  2. $IncFloat(10,0.5) - 10 is initial step is 0.5. Output: 10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,...
  3. $IncFloat(0,-0.25) - negative step is -0.25. Output: 0.0, -0.25,-0.50,-0.75,-1.0,...
  4. $IncFloat(0,0.5,,,2) - use each value twice. Output: 0.0,0.0, 0.5,0.5, 1.0,1.0...
  5. $IncFloat(0,0.5,,2.0) - 2.0 is high border. Output: 0.0,0.5,1.0,1.5,2.0,0.0,0.5,1.0,1.5,2.0...
  6. $IncFloat($Pattern(@1), $Vars(#step)) - use column #1 as a initial value and local variable '#step' as Step value.

In the second form the first parameter should be replaced to table name and column name. The function it will execute "select max(column) from table", add "step" to retrieved value and use result as initial value.



See also: incremental integer, incremental date, incremental time, incremental symbol.