Giter Club home page Giter Club logo

square's Introduction

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.

square's People

Contributors

panquesito7 avatar stepfenshawn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

square's Issues

Add Doxygen documentation

It would be nice if you could add Doxygen documentation.
For reference, you can see the TheAlgorithms/C repository.

I can also help with this if required/needed (I'm very good with that stuff).
IMHO, this will make the code much more understandable, clean and better. ๐Ÿ™‚

Why use "cat" to print to screen instead of "print"

Almost all languages use print as the function to print to screen. If u want this language to even stand a chance of going mainstream u need to stick to such conventions. Such a minor detail could be the difference between someone liking or disliking a language. Anyway am not one to criticise a lot, I know it must be super difficult build your own language from scratch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.