This repository was archived by the owner on Apr 6, 2024. It is now read-only.
Repository navigation
Releases: 418e/Tron
Releases · 418e/Tron
Release list
2.8.0
2.7.0
v2.6.0
- if statement can now handle multiple expressions
- else if statement can now handle multiple expressions
- while statement can now handle multiple expressions
- assignent can now handle multiple variables
- variables with uppercase name now will be immutable
- updates now will be released once in two weeks
2.5.0
- added type system
- added 5 types:
number,string,bool,null,array - added type checking for variables and function paramters:
let i: number = 0;
// let i = 0; is still valid
fn sum(x: number , y: number) {
// fn sum(x,y) is still valid
return x + y;
}
v2.4.1
v2.4.0
- added short functions
fn main(x) : x + 1;
print main(6);
// 7
- added sleep native:
sleep(time):
sleep(2000);
// will create delay for 2s
- added ternary native:
ternary(statement, value1, value2)::
let i = 0;
let x = ternary(i > 1, 4, 5);
print x;
// 5
// if statement is true, return value1, if not: value2
- added cmd native:
cmd("command"):
let x = cmd("echo hi");
print x;
// "hi"
- removed cmd functions
v2.3.1
v2.3.0
- new cli command
tron update - added new
wait/beforestatement:
wait 1000 {
print 1;
}
will print 1 after 1000ms delay
wait 1000 {
print 1;
} before 200 {
print 0;
}
will print 0, with 200ms delay 1000/200 times, and then print 1;
wait keywords: wait, hold pause
before keywords: before, until, during
- removed
.and:as end/start - removed
#comments ?>>elif =>#
v2.2.0
- added variable immutability
- removed try/catch statement, input statement and #array library
- numbers changed from f64 to f32 type
- added
then(start bracket),as(assign operator),exe(cmd function),execute(cmd function),run(cmd function),cmd(cmd function) - removed
incr(increment),decr(decrement),what if(elif),whatif(elif),dec(variable),state(variable),respond(return),append(return)
v2.1.1
- fixed binary
len()now returns numbers- added
pow(),root(),random(),min(),max(),log(),log2,log10,ceilto math library - changed output style
- new commands ,
fn name <-
fn echo <- "ls";
let response = echo();
say response;