Git Product home page Git Product logo

tbox-language's Introduction

Tbox编程语言

简体中文

English

Tbox Language

Tbox Language


Tbox 你好T型箱子

// <=> import console; console.print
import {print} of "console.tbox";
func main() {
	print("Hello, Tbox");
}

打印输出:

Hello, Tbox

Tbox 数学运算

//import console;
import "console.tbox";
func main() {
	num i = 1/4 + 4^2;
	console.print(i);
}

打印输出:

6

Tbox 判断

//import console;
import {print} of "console.tbox";
func main() {
    num x = 6;
	if(x > 5) {
		print("Well done!");
	}else{
		print("Maybe some errors!");
	}
}

打印输出:

Well done!


Tbox 字符串

//import console;
import {print} of "console.tbox";
func main() {
	string version = "0.0.1";
	string title = "Text Game";
	string text = "那天,这你来玩呢";
	print(text);
	print("你好,好耶,稍等");
	print("稍等...");
}

打印输出:

那天,这你来玩呢
你好,好耶,稍等
稍等...

TBox 模块系统

// module.tbox
export func add (int a,int b):int{
	return a + b;
}
//main.tbox
import {add} of module;
import console;

func main(){
     console.print(add(1,2));
}

输出:

3

Tbox 关键字

关键字 说明
import 导入
of 取模块内容
export 导出
num
string 字符串
func 函数
true 真(1)
false 假(0)
null
if 如果
elif 如果否则
else 否则
for 循环
while 循环
break 循环结束
for 计数循环
return 返回

num(int的别称)
bool
int
long
double
float

tbox-language's People

Contributors

beanflame avatar theflysong 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.