Thread: VB6 Calculator
View Single Post
Old Nov 6th, 2007, 1:27 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: VB6 Calculator

It involves more than the plus button. It involves what surrounds the '+' sign, as well. With typical rules of precedence, 3 * 4 + 2 is not the same thing as 3 * (4 + 2).

You can see that "what you do" with the plus depends on the surroundings, and not just the immediate surroundings (4 and 2).

That's why I recommended you do some research. There's little learning in copying any code I might post. You need to understand why it's written the way it is.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote