|
-
Integer Division
I am new to the programming world. I understand integer division however my problem is why when you use integer division and the divisor is one is the result being rounded vice the integer value of the division.
For, example when I enter the following code.
'declare variable
Dim intCommission as Integer
'calculate commission
intCommission = 2.78 \ 1
'display commission
me.uiCommissionLabel.text = intCommission
VB.Net returns a result of 3 vice 2 in the commission label
Was wondering if any one could explain this to me or lead me to correcting this problem. Thanks!
Similar Threads
-
By angela_quests in forum VB Classic
Replies: 2
Last Post: 04-13-2007, 04:57 AM
-
By eduardoms in forum Security
Replies: 2
Last Post: 05-06-2005, 10:26 AM
-
Replies: 146
Last Post: 08-12-2002, 10:40 PM
-
By James Knowlton in forum .NET
Replies: 2
Last Post: 04-15-2001, 09:25 PM
-
By Kunal Sharma in forum VB Classic
Replies: 2
Last Post: 04-25-2000, 03:45 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks