brackets or whatever you call them
At first I was all how am I going to deal with the order of operations? and I thought about maybe creating a parse tree.
That seemed excessive, especially when I thought about how simple calculators usually work, from a usage standpoint. Which was okay, even good, but how to account for brackets. Or better, nested brackets?
There’s probably a real name for this method, but I don’t know it. Karl will definitely know? And if he doesn’t he’s lying.
(more…)