Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27333

VS 2008 mod math question

$
0
0
This makes no sense to me. The mod fuction is suppost to return the remainder of a division problem. It isn't for me. I have tried just about every combination of dim'ing the variables as doubles or integers, all to no result. Why does this not work?


Dim numberOfSamples As Integer
Dim modNumb As Integer
Dim modAmount As Double

modNumb = 4
numberOfSamples = 41
modAmount = numberOfSamples / modNumb Mod modNumb
'modAmount = 2.25 one time 2.2 another, and 2 a third time depending on how the variables were defined; why is this not 1 like it should be????

Viewing all articles
Browse latest Browse all 27333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>