Stack algorithm
|
07-13-2016, 02:28 AM
Post: #4
|
|||
|
|||
RE: Stack algorithm
Here are a few stack functions I wrote as part of a larger C++ program. The function names and comments are fairly self explanatory. My approach was fairly straightforward. I discovered there are many special cases that have to be accounted for when emulating RPN stack dynamics.
PHP Code: void enter_pressed(bool *enter_was_pressed_) PHP Code: void add_pressed(bool *a_function_was_executed_, bool *decimal_fraction_) PHP Code: void space_pressed (bool *decimal_fraction_, bool *a_function_was_executed_, bool *enter_was_pressed_, bool *decimal_point_just_pressed_) PHP Code: void tab_pressed() //tab is the CHS key PHP Code: void roll_up_pressed(bool *a_function_was_executed_) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Stack algorithm - deetee - 07-12-2016, 12:36 PM
RE: Stack algorithm - Namir - 07-12-2016, 04:32 PM
RE: Stack algorithm - Paul Dale - 07-12-2016, 09:55 PM
RE: Stack algorithm - Dwight Sturrock - 07-13-2016 02:28 AM
RE: Stack algorithm - Dieter - 07-13-2016, 09:54 AM
RE: Stack algorithm - deetee - 07-13-2016, 02:13 PM
|
User(s) browsing this thread: 1 Guest(s)