Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

CInt overflow

$
0
0
Give me CInt Overflow. What should I change to overcome this error
Thanks ==================================================================================================== =================================
' function : GeneralVerify_SiteTenderAmts
' desc : Verifies that 2 arrays of tender types and their amounts have changed by the amount specified
' params : pArr1 - First array of tender types and amounts
' : pArr2 - Second array of tender types and amounts
' : pAmt - Amount that the amounts in the two arrays should differ by
' returns : N/A
' ==================================================================================================== =================================
Sub GeneralVerify_SiteTenderAmts(pArr1, pArr2, pAmt)
isPass = True
If UBound(pArr1, 1) = UBound(pArr2, 1) and UBound(pArr1, 2) = UBound(pArr2, 2) Then
For x = 0 to UBound(pArr1, 2)
:mad:If CInt(pArr2(1,x)) - CInt(pArr1(1,x)) = pAmt Then strResults = strResults & "<tr><td>" & pArr1(0,x) & "</td><td bgcolor=#66FF66>$" & pArr1(1,x) & "</td><td bgcolor=#66FF66>$" & pArr2(1,x) & "</td><td bgcolor=#66FF66>$" & CInt(pArr2(1,x)) - CInt(pArr1(1,x)) & "</td></tr>"
Else
isPass = False
strResults = strResults & "<tr><td>" & pArr1(0,x) & "</td><td bgcolor=#FF8080>$" & pArr1(1,x) & "</td><td bgcolor=#FF8080>$" & pArr2(1,x) & "</td><td bgcolor=#FF8080>$" & CInt(pArr2(1,x)) - CInt(pArr1(1,x)) & "</td></tr>"
End If
Next
End If
strTable = "Verify that the Tender Amounts in the SITE_TENDER table differ by $" & FormatCurrency(amt) & "<br/><table class=""tbFormat""><tbody><tr><th>Tender Type</th><th>Starting Amount</th><th>Ending Amount</th><th>Difference</th></tr>" & strResults & "</tbody></table>"
If isPass = True Then
Call Checkpoint_CustomReporter("Pass", "Verify SITE_TENDER", strTable)
Else
Call Checkpoint_CustomReporter("Fail", "Verify SITE_TENDER", strTable)
End If
End Sub

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>