Mistři v programování na #hovnokod

Visual Basic #546

Public Function fRoundSumma(pDbl As Double) As Double
 On Error Resume Next
 Dim vStrSum As String
 If vFieldRoundSummuDoInt Then
    vStrSum = str(pDbl)
     If InStr(1, vStrSum, ".5") > 0 Then
        If pDbl < 0 Then
           fRoundSumma = Abs(Fix(pDbl)) + 1
           fRoundSumma = fRoundSumma * (-1)
          Else
           fRoundSumma = Fix(pDbl) + 1
        End If
       Else
        fRoundSumma = Round(pDbl, 0)
     End If
   Else
    fRoundSumma = Round(pDbl, vFieldRoundDo)
 End If
End Function

HovnoKod,