Calculator application only prints string

urbycoz

New member
Joined
Jul 29, 2007
Messages
3
Programming Experience
Beginner
I've build a vb.net calculator. It works by concatenating the text property of each button pressed into a string (eg. "5*4+6/2")

However all I can get to appear in the display window is the string itself. If I use "val(string)" it just prints the first number in the string, rather than doing the calculation for me as I would like.

Is there a simple way around this?
 
Thank you. Looks like that would work. But it feels a bit like using a sledgehammer to crack a nut.

Is there no simpler way to get mathematical operators to function properly from a string?
 
No, there isn't.
 
Back
Top