lunaslide wrote:

> > http://www.geocities.com:80/Heartland/Estates/2913/calc/treea_38.htm
>

Did you look at this?

> It looks like what you're trying to do can be accomplished with a binary
> operator tree.  For example:
>
> 4 * 5 + 3
>
> can be expressed as such
>
>   +
>  / \
> 3   *
>    / \
>   4   5

Yes, but remember I am doing algebra not arithmetic.  That is, I am
constructing

     |
    /\
  A &
        /\
       B C
Where A, B, and C evaluate to T or F.

> I will pull down my Data Structures textbook from comp sci and code
> this, because now you have me curious :-) Do you understand C++?  This

> would be best implemented as a class.

Yes, I agree, that sounds attractive.  After I gave it a bit of
consideration, I realized it wasn't quite as obvious as it first seemed.  I
have taken a course in C++ but haven't really used it since.  If you haven't
stepped through algorithm I presented you may wish to.  I believe it will
construct the tree.  Perhaps I will attempt this in C and we can compare
notes.  I'm supposed to be working on an MCSE right now instead of learning
to program.  Yuck!

> I'll try it in perl too, which I
> am presently learning, just to see if I can.

Yea I've been playing with perl.  It really is fun.  I'm not sure what data
structures perl will offer for such a problem.  You may be able to code this
whole thing in one line of perl which no one in the world will understand ;-)

Steve

--
http://www.winehq.com   | I think.
http://www.suse.com     | I think I am.
http://www.kde.org      | Therefore I am.
http://samba.anu.edu.au | I think? - Moody Blues



--
To get out of this list, please send email to [EMAIL PROTECTED] with
this text in its body: unsubscribe suse-linux-e
Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
archive at http://www.suse.com/Mailinglists/suse-linux-e/index.html

Reply via email to