Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1.28 KB

README.md

File metadata and controls

72 lines (49 loc) · 1.28 KB

The Square programming language

Build status Gitpod ready-to-code

What is Square

Square is a powerful programming language.

Features of Square

  • Simple Syntax
  • Highly Portable
  • Easy to learn
  • Small

How to run

Compile:

cd src
gcc -w main.c node.c parse.tab.c squ_run.c value.c squ_math.c -lm

Run with a file:

cd src
$ a.exe ../examples/helloworld.squ

Examples

Print "Hello World!" on the screen:

print "Hello World!"

A program to check whether it is an even number:

def a := 10
# You can replace "==" with "is" #
if a % 2 is 0 -> {
    print "This is a even number"
}

else -> {
    print "This is a odd number"
}

Result:

This is a even number

Contribution

Welcome to pull a request!

TODO

  • A tiny VM for square!

License

Copyright (c) 2020 Stepfen Shawn

The Author

Square was designed and developed by Stepfen Shawn in 2020.