Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Basic's Round function is horrid...
06-18-2018, 07:57 AM
Post: #1
Visual Basic's Round function is horrid...
Hi,

Create a simple form and in the Form_Load() sub, enter the following: MsgBox Round(3.5)
Run the project. Run it again. One time you'll get 3, the other 4. Why the fuck any modern programming language -- even one as lame as VB -- doesn't have a sensible, predictable round function is beyond me. I should not have to write my own goddamn round function if I want to get predictable performance out of it! There ought to be a standard Round(value As Double, Optional roundup As Boolean = True) function that rounds 0.5 up if roundup is true, and down if it's false. Why, oh why, have they not changed this in several versions of VB??? Does VB.NET do the same goddamn thing?

Please help.

I didn't find the right solution from the Internet.

References:-
https://arstechnica.com/civis/viewtopic....5&t=952423
Property Insurance Marketing Example

Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  can a visual basic program be platform independent? kevinmanuel 0 383 03-24-2018 11:52 PM
Last Post: kevinmanuel

Forum Jump: