This language is a work in progress
Forth but written in C++. The language is stack-based (like forth), meaning you can push numbers to, and pop numbers off the "stack" (similar to Reverse Polish Notation), aswell as having basic operations. It's not the same as Forth, but it's close enough, right?
- Compiled
- Interpreted
- Stack-based
- Turing-complete
git clone https://github.com/veasman/corth.git
cd corth
mkdir build
cd build
cmake ..
make
./corth file.corth
You can check out examples for some small programs written in corth. Otherwise, here is a small example of how to use conditionals.
// If 100 + 20 > 20
if 100 20 + 20 > do
// Print 9 squared
9 dup * print
// Corth requires if statements to also have an else
else end
Feel free to submit issues and enhancement requests.
Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, I follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to a new branch
- Push your work back up to your fork
- Submit a Pull request so that I can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
This project uses the GNU General Public License.