Thread: VB6 Calculator
View Single Post
Old Nov 6th, 2007, 7:29 PM   #10
johann vanoustren
Newbie
 
Join Date: Nov 2007
Posts: 8
Rep Power: 0 johann vanoustren is on a distinguished road
Re: VB6 Calculator

Quote:
Originally Posted by DaWei View Post
If you're allowed strictly left to right evaluation, then go for it. Collect the first operand. Collect and save the operator. Collect the second operand. Perform the operation. The result is your new "first" operand. Collect the next operator. Collect the next operand. Perform the operation. Wash, rinse, and repeat until done.
So basically the code I have now is fine and I just need to do what Sane mentioned?
And all I'd be missing is to have it actually perform the calculation, just not update the answer box until the equal button is pressed? And that would mean a new variable to hold the current new number?

Trying to work it in my head knowing exactly what I need before I head in to school tomorrow, and trying to get it all right in what I need.

Or instead of having this:

txtAnswer.Text = sngCurrent

I need something at the end of each section before end sub like:

sngOne = sngCurrent

?
johann vanoustren is offline   Reply With Quote