snappy 0 Posted February 5, 2014 Report Share Posted February 5, 2014 Can anyone please explain why the Int function returns random incorrect values in the following code? Running Win Server2003 and IIS 6. The full code and result can be viewed here www.patronomy.com/test/test-int.asp I couldn't believe it at first because Stripe (a payment processor) requires whole numbers eg, 803 for $8.03 and as you can see the iteration has many errors. <table><%TR "Value", "Int(Value*100)"For i = 1 to 10 For j = 1 to 10 k = i+(j/100) TR k, int(k*100) NextNext %></table><%Function TR(str1, str2) Response.Write("<tr><td>"&str1&"</td><td>"&str2&"</td></tr>")End Function%> Quote Link to post Share on other sites
Ingolme 1,019 Posted February 8, 2014 Report Share Posted February 8, 2014 Perhaps the problem is that you sent a string in this line rather than execute the statement: TR "Value", "Int(Value*100)" Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 13, 2014 Report Share Posted February 13, 2014 Your link isn't working. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.