[quote name='Oberon_Command' timestamp='1341033093' post='4954206']
[quote name='Bill Fountaine' timestamp='1341032033' post='4954197']
Like, getting the calculator to add multiple numbers.
So, my attempted summary of the situation.
You have a textbox containing a string which represents the expression to be calculated.
You want to take the equation represented in string in the textbox and compute the output of the expression.
But the string representation of the expression isn't very useful to you - at least, not yet.
Am I correct so far?
[/quote]
yes
I want to have the calculator able to deal with multiple numbers instead of just 2.
97 + 576 + 46, etc.
I originally thought storing each number in an array/list somehow would do the trick, but dealing with taking the numbers out of the string after each math symbol is what has me stuck atm.
[/quote]
Okay.
Just so we're on the same page here: leaving aside the problem of "taking the numbers out of the string" (there's a specific term for this - expression parsing - which we'll get to in a moment), have you determined how to deal with the numbers once they're "out of the string?" If so, can you please post the code so that we can see where you're going with it? If not, let's tackle that problem, first since it's easier - write code that takes each number in an array (or a list, if you prefer - this is what I would prefer, for reasons that will become clear later) and adds them together.
As an aside: I often find it helpful to write a program in chunks according to what I already know how to do. If I know how one particular step works, and I know exactly what sort of thing I'm going to get from the steps before it but not how that predecessor step will work, then I can write that particular step in isolation with some "dummy" test data in the format that I think that particular step will consume once the one before it is done. That's useful for unit testing, as well - if I can verify that each part of my program works on its own when given data that I know should work, then I can track down bugs more easily.