Giter Site home page Giter Site logo

tsharp's Introduction

The T# Programming Language

T# Build

WARNING! THIS LANGUAGE IS A WORK IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE!

Install & Run

Install

$ sudo make install

Run

$ t# <filename>.t#

Hello World

func main() do
    print("Hello World");
end;

Function call

func SampleFunc() do
    print("Function call!");
end;

func main() do
    SampleFunc();
end;

Variable

func main() do
    name = "T#";
    print(name);
end;

Call variables from other functions

func SampleFunc() do
    name = "T#";
end;

func main() do
    SampleFunc();
    print(SampleFunc.name);
end;

If statement

func main() do
    if 10 == 10 do
        print("Hello World!");
    end;

    if 10 != 10 do
        print("Hello World!");
    else
        print("T# Programming Language");
    end;

    if 3 < 2 do
        print("Hello World!");
    end;

    if 3 > 2 do
        print("Hello World!");
    end;
end;

While loop

func main() do
    num = 0;
    while num < 101 do
        print(num);
        num++;
    end;
end;

FizzBuzz

func main() do
    i = 1;
    while i < 101 do
        if rem(i, 15) == 0 do
            print("FizzBuzz");
        elif rem(i, 3) == 0 do
            print("Fizz");
        elif rem(i, 5) == 0 do
            print("Buzz");
        else
            print(i);
        end;
        i++;
    end;
end;

Vim Syntax Highlighting

Contributors

tsharp's People

Contributors

redocmath avatar

Stargazers

 avatar

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.