Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


how to check for number after the decimal point


how to check for number after the decimal point

Author
Message
WestSideRailways
WestSideRailways
Forum God
Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)

Group: Forum Members
Posts: 2, Visits: 3
Hi everyone,



Sorry if this has been asked before..Wink



Not sure how to ask about this....



A = 1.005 / A= 1.450 / A= 1.670



the above are examples hehehe



if A <= .50 then A=1



if A> .50 then A=2



hope you get my drift....



am not sure how to go about this in code



Thanks for reading......Smile
WestSideRailways
WestSideRailways
Forum God
Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)Forum God (790 reputation)

Group: Forum Members
Posts: 2, Visits: 3
Just had a thought (look out everyone)Laugh



this is a long answer(a lot of typing anyway)



of using the "select command"



select FracSelect



case 0 to case 5

A=1



case 6 to case 9

A=2

End Select



not pretty but it works. hehehe

Mark
Mark
Forum God
Forum God (139K reputation)

Group: Moderators
Posts: 1.1K, Visits: 11K
Does the Round Function do what you need?

A = Math.Round(A, System.MidpointRounding.AwayFromZero)


GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search