Information Technology - Computer Programming - Source Code - Homebrew - Open Source - Software - Hardware - 8 bit - 16 bit - 32 bit - 64 bit - x86 - x64 - DOS - Windows - Linux - Arduino - Embedded - Development - Retro - Vintage - Math - Science - History - Hobby - Beginners - Professionals - Experiment - Research - Study - Fun - Games

RPN Calc

Anything GW-BASIC, QBasic, Quick Basic, Free Basic, QB64, or RapidQ related.
Post Reply
Site Admin
Posts: 118
Joined: Wed Feb 22, 2023 6:51 am

RPN Calc

Post by admin »

Written in Quick Basic.

FREEWARE Open Source

RPN Calc is command line expression evaluator.
Written in Quick BASIC and compatible with x86 DOS.

Example expressions:

Code: Select all

Type help for assistance.

Operator precedence:

NOT(), ^, MOD, *, /, +, -, <, >, <=, >=, =, <>, XOR, AND, OR



Bitwise operations are not supported.

# inserts the last evaluation in an expression.
Enter STOA - STOZ to store the last evaluation.
Enter RESET to set values for the variables.
Enter LIST to view the variables values.

Enter CLS to erase the screen.
Enter STEPS to disable/enable printing and recording of steps.
Enter EXIT to end the program.
Enter HELP or ? to see this text again. ...
Site Admin
Posts: 118
Joined: Wed Feb 22, 2023 6:51 am

Re: RPN Calc

Post by admin »


I was about ready to send this project to the graveyard as I have been working on newer things. With the newer Express Calculator and RP1 projects being written in C and PHP, I thought it would be good to update RPN Calc so there's an example of my expression evaluator in Quick BASIC/QBasic. RPN Calc has been neglected, so it wasn't good enough to remain. This update will hopefully change that as well as pave the way for even more updates.

This update includes:

fixed handling of negation
added EXP() function
commands are now parsed as functions to simplify the code
commands are modified to be closer to the newer Express Calculator.
hex values may now be denoted with the &H prefix

This update was a bit rushed and still needs more testing. I have little time between my job and off time to work on code. I will probably be making modifications if any problems arise. I have given RPN Calc the Alpha version designation to mark future updates. If you find an issue, as always please let me know so I can fix it.
Post Reply