# Termslang Reference ## Key Words ### `struct` Creates a struct object. ```rust struct MyStruct { } ``` ### `func` Creates a function object. ```go func null myFunction: int arg { } func null myFunction2 { } ``` ### `let` Creates a variable or defies a struct field. ```swift func null myFunction: int arg { let int myVar = 0 ~ } ``` or ```swift struct MyStruct { let int myField ~ } ``` ### `updt` Updates the value of a variable. ```swift func null myFunction: int arg { let int myVar = 0 ~ updt myVar += 1 ~ } ``` ### `return` Returns a value from a function. ```swift func int myFunction: int arg { return 0 ~ } ``` ### `cll` Calls a function without capturing return value. ```swift func null myFunction: int arg { cll myOtherFunction ~ } ``` ### `print` Prints a string to the terminal ```go func null myFunction: int arg { print "Hello World" ~ } ``` ### `println` Prints a string line to the terminal ```go func null myFunction: int arg { println "Hello World" ~ } ``` ### `import` Imports another `.tms` file. ```go import "./myLib.tms" ~ ``` ### `loop` Creates a loop. ```rust func null myFunction: int arg { loop i: i < 10 { } } ``` ### `Continue` Jumps to next iteration of loop. ```rust func null myFunction: int arg { loop i: i < 10 { continue ~ } } ``` ### `Break` Exits a loop. ```rust func null myFunction: int arg { loop i: i < 10 { break ~ } } ``` ### `if` Creates a conditional. ```swift func null myFunction: int arg { if true { } } ``` ### `else` Creates an if-else conditional. ```swift func null myFunction: int arg { if false { } else if true { } else { } } ```