Sub Process_Globals
End Sub
Sub Globals
Dim x As Double : x=16225.225
Dim y As Double
End Sub
Sub Activity_Create(FirstTime As Boolean)
y = cRound(x,2)
Log("Round: " & y)
End Sub
Sub cRound (Value As Double, decimal As Byte) As Double
decimal = Power(10,decimal) ' Power = 10^decimal
Value = (Value * decimal) + 0.5
Dim sma As String
sma = Value
If sma.IndexOf(".") <> -1 Then
sma = sma.SubString2(0,sma.IndexOf("."))
End If
Value = sma / 100
Return Value
End Sub