Skip to content

T# Programming Language. interpreted × compiled Language. In development.

License

Notifications You must be signed in to change notification settings

redocmath/Tsharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

T# Programming Language. interpreted × compiled Language. In development.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published