|
-
Jun 29th, 2009, 04:06 AM
#5
Re: Stupid Questions, I Know... But I'm Stumped
 Originally Posted by RayLivingston
3) Didn't realize there were two division operators! That makes sense. I would hope that Y = X \ 2 *would* give a result of 1?
I doubt it. I think it rounds, just like CInt does.
If you want to decide whether to truncate or round it, then you should TELL it to. You can use the Math.Round function for example, and there's probably also a Math.Truncate function. You should never assume that VB does something if you are not telling it to. You should always tell it explicitly what to do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|