TechScript is dynamically typed. Variables do not have fixed types, but values do.
Represents 64-bit signed integers:
count = 42
negative = -100
Represents 64-bit floating-point numbers:
pi = 3.14159
temp = -12.5
UTF-8 encoded string sequence:
message = "Welcome to TechScript"
Logical values:
is_running = true
has_errors = false
Represents the absence of value:
data = null
Ordered list of values (can contain mixed types):
items = [1, 2, "three", true]
Key-value storage (dictionary):
configs = {
"host": "localhost",
"port": 8080
}
Objects instantiated using class and new:
class Dog
do init(name)
self.name = name
end
end
my_dog = new Dog("Fido")
For more information, see Classes.