D DekaFlash Well-known member Joined Feb 14, 2006 Messages 117 Programming Experience 1-3 Mar 27, 2006 #1 What is the easiest way to determine if the result of a calculation is a whole number or a decimal. Thanks
What is the easiest way to determine if the result of a calculation is a whole number or a decimal. Thanks
T TechGnome Well-known member Joined May 23, 2005 Messages 896 Programming Experience 10+ Mar 27, 2006 #2 Is_whole = ((result - round(result, 0)) = 0) -tg Upvote 0 Downvote
jmcilhinney VB.NET Forum Moderator Staff member Joined Aug 17, 2004 Messages 15,144 Location Sydney, Australia Programming Experience 10+ Mar 29, 2006 #3 VB.NET: If myNumber Mod 1 = 0 Then 'myNumber has no fractional part. End If Upvote 0 Downvote