%GetCurrentRow function


Function
The function returns the current row when calculating a structured eval tag or structured calculated historical value.


Declaration
INT %GetCurrentRow()
Parameters

None.

Description
The function returns the row number for which the current calculation of a structured eval tag or structured calculated historical value is performed. For simple eval tags and calculated historical values, the function returns 0.
This function allows you to change the calculation logic depending on the row number, as the following example shows.
Example
INIT
REAL _result
INT _row
 _row := %GetCurrentRow()
 IF _row < 10 THEN
   _result := H.Power[0] * 0.75 ; lower efficiency engines
 ELSE
   _result := H.Power[0] * 0.85 ; higher efficiency engines
 ENDIF
FINALLY
 _result
Napíšte komentár