Your Ad Here

VB: Round up decimal value by truncate floating point

So I was searching for a method to get the integer value from a floating number but found a quick workaround towards the problem. Below is what I have come up with:

function convertInt(value as double) as integer
  dim arrayNo
  arrayNo=Split(value,”.”)
  convertInt=arrayNo(0)
end function

I believe the above function code is self explainatory. Anyone have a better way or suggestion?

Written by admin on August 21st, 2007 with no comments.
Read more articles on Personal and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

Your Ad Here