"evan" <ep******@frontiernet.net> wrote in message
news:zy***************@news02.roc.ny...
Can you give me a hint as how to go about evaluating such an expression.
The actual expression will be different every time (user input). The data will
be sorted in an array or a list.
Thanks,
Evan
You have to write a parser. Best way would be to find an example in a book.
Writing parsers is a big topic in computer science and many books cover this
in more or less depth.
Stroustrup has an example in 'The C++ Programming Language' 3rd edition. His
is an evaluator for arithmetic expressions whereas you seem to have a
logical expression but the principles are just the same.
john