This reference documents the globally available built-in functions in TechScript 2.0.
Prints the string representation of val to stdout, followed by a newline:
say "Hello"
say 42
Prints the prompt string to stdout and blocks execution until input is read from stdin. Returns the input as a string:
name = ask "Enter your name: "
Returns the size of a list, map, or string as an integer:
size = len([1, 2, 3]) # 3
char_count = len("Tech") # 4
Returns a string representing the runtime type of the value ("int", "float", "str", "bool", "list", "map", "null", or custom class name):
say typeof(42) # "int"
Suspends thread execution for ms milliseconds:
sleep(1000) # Sleep for 1 second
Triggers a runtime panic if the condition is false:
assert(1 == 1)
Halts VM execution immediately and prints the error message:
panic "Unrecoverable fatal error occurred"
Exits the process immediately with the specified integer status code:
exit(0)