snappy Posted February 5, 2014 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%> Link to comment Share on other sites More sharing options...
Ingolme Posted February 8, 2014 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)" Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2014 Share Posted February 13, 2014 Your link isn't working. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now