diff --git a/README.md b/README.md new file mode 100644 index 0000000..26c1d74 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# High Ground + +High Ground is a programming language based on Ground. + +It is the reference language designed to teach you how to build your own Ground-based language. + +## Compiling + +First, ensure CGround is installed on your system with `sudo make install`. Then, compile with + +``` +g++ src/main.cpp -o hg -lgroundvm +``` + +## Usage + +High Ground files use the `.hg` extension. Run files as you would with any other interpreted language. + +## Using High Ground + +### Types + +* `int`: Ground int (64 bit integer) eg 3, 7, 31432 +* `double`: Ground double (Double precision floating point) eg 3.141, 2.7 +* `string`: Ground string (char*) eg "Hello, World" +* `char`: Ground char (char) eg 'a' +* `bool`: Ground bool (either true or false) + +### Printing + +Prefix an expression with `puts` to print it to the console. + +``` +puts "Hello, world!" +puts 3.141 +puts 7 +puts 'a' +puts true +``` + +### Math + +Add numbers with `+` (more operations coming soon) + +``` +puts 1 + 1 +puts 3.14 + 2.7 +puts 532 + 314 + 89432 +```