I am new to VB I am a c++ programmerr. I know in c++ when you declare a variable as an int it will return a whole number. In VB I am delaring a variable as an interger and when I do my calculations it comes back with a decimal. How can I truncate the number and just show the whole number??
mrjoli021
-3
Junior Poster
Recommended Answers
Jump to PostCould you show your code for the calculation? Integer does return a whole number, so you must be using it with a single. VB will convert the integer to a single and return a single. This is one reason you should use Option Strict, so VB won't do any conversions, …
All 4 Replies
waynespangler
63
Posting Pro in Training
waynespangler
63
Posting Pro in Training
mrjoli021
-3
Junior Poster
StrikerX11
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.