Hi
Juerd,
Great program! I was going to write something like this
(but much simpler variant), however, now as I look at your
code, I might reuse parts of it. Of course, it's pretty hard to read the code without comments. I have an old code for calculator written in C++, and it, too, lacks significant amount of comments, unfortunately =/. I sort of do get the general idea of how a calculator should work.
What i'm more interested in, though, is making an expression interpreter module. Ideally, such module should accept a map of acceptable commands and classes/methods that handle them. Say, this way it should be easy to customize calculator in such a way that it could compare strings with the 'eq' operator (like Perl ;), or do something different.
I'd appreciate it if you could /msg me your approach to implementing a calculator ;). Thank you much.
cheers,
|
"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
|