-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mars wrote:
if I want to write a program to evaluate a formulae,
what kind of algorithm should I use??
for example,
input:
(2+3)*(3/4)+6-8
Google for "recursive descent parser"
how to deal with the brackets??
That's part of what the parser does.
need to use stacks??
Perhaps. Or not, as your implementation requires.
Thx.......
?_?
- --
Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFCE1wnagVFX4UWr64RAmueAKC7pvDB+wDo3KYuoTRUE3 Vnb5y4vwCgv3iE
lWW1zW5Dy21NDd/V9dE7DTw=
=yl+Y
-----END PGP SIGNATURE-----