|
|
HP 48GX emulator
It's called 'postfix' math, and the HP calculator is a common teaching tool in introductory programming classes, because [a] it's a great way to reduce ambiguity in your notation, and [b] it's a great way to teach about stack based data structures. Consider:
The thing to notice is that you keep adding values to your 'stack' until you hit an operator, at which point you pop the top two items off the stack and apply the operator to those two items, placing the resulting value back on the stack, and you repeat this process until the stack is reduced to a single value. figuring out the strategy used by HP's calculators is a great way to learn about stack structures, and knowing how to work with stacks makes all kinds of programming problems easier (stacks describe the most recent web pages visited, the order you're allowed to use tags in valid HTML/XML documents, etc). I hated that class but I'm glad I understand the material... ;) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|