Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.
/ haverforth Public archive

Final project for programming languages course

Notifications You must be signed in to change notification settings

csvillalta/haverforth

Repository files navigation

HaverForth in JavaScript

An interactive FORTH calculator implemented in JavaScript.

Adapted from https://github.com/kmicinski/haverforth

Part 7 and 8 of lab 7E are in the file named lab_7E_reflections.MD. Part 13 of the final is in the file named final_project_reflections.MD.

My additions for part 12 of the final project were:

  • a row of buttons for the predefined functions
  • the ability to delete user-defined functions using "del" which also deletes the associated button
  • the ability to see all available commands by typing "h"
  • colored terminal outputs for errors and "h"

Usage

Once you have launched index.html. You can begin entering commands in the terminal. You have the option to enter commands line by line:

1
2
+

or by entering all the commands in one line:

1 2 +

We can also define our own functions using the following format:

: [function name] <function body> ;

For example I define the function double:

: double 2 * ;

If I wanted to delete double I would type:

del double

About

Final project for programming languages course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published