Answering in reverse order here. Your if structures actually don't have anything to do with stack size. They are simply compiled down to compare and jump statements. What this does mean (and the reason Trie's are SOOO much faster) is that you are doing the comparison of the full value every time until you get a "true" back. So; EAT and EAST both have to evaluate fully, but the Trie lets you say "I have an E, then A, then oh look a T". Hopefully that makes some sense. I've actually had to work on code that had several 100 if's back to back (it was a nightmare but it "worked"). I wouldn't condone this, if you start getting over 8-10 if's backed up its almost impossible for the "average" developer to follow the meaning.

Now, on interfaces; FPC is VERY similar to Delphi, so you can apply what you find about Delphi to FPC in this area:
Introductory stuff:
http://www.delphibasics.co.uk/Articl...Name=Interface
http://delphi.about.com/od/oopindelp...phi_oop5_3.htm

Delegates and Interfaces for multiple inheritance:
http://www.obsof.com/delphi_tips/pattern.html

BTW: I searched Google for "delphi interfaces multi inheritance tutorial" to get the above resources. Yes, you do have to do some digging in the results, but you can find links. Unfortunately the best article I know of on the subject was in the Delphi Magazine that is now out of print. If you can find someone with the digital version maybe they can send it to you. Otherwise, your going to have to do some digging and some work to figure it all out.

- Jeremy