Welcome to the official documentation for Timmy's Interpreted Programming Language, a modern and simple programming language. Try it out here
Author: Timileyin E. Farayola | https://linkedin.com/in/timileyin-farayola | https://github.com/rafmme | timileyin.e.farayola@gmail.com | © APRIL, 2025
Supported data types for variables.
String:
make str_one = "string 1";
make str_two = `string 2`;
make str_th = 'string 3';
count(str_two) // Returns the length of the string. //Output: 8
display(str_one * 3) // Output: "string 1string 1string 1"
Integer:
make num = 26;
Boolean:
make isCorrect = true;
make notTrue = false;
Null:
make a = null;
Supported operators.
Arithmetic Operators: make num = 3; Multiplication "*" display(num * num) //Output: 9 Division "/" display(num / num) //Output: 1 Addition "+" display(num + num) //Output: 6 Subtraction "-" display(num - num) //Output: 0 display(((num * num) + (num + num)) / num) //Output: 5 Logical Operators: !true // false !false // true Comparison operators: 3 == 3 // true 3 > 4 // false 4 < 5 // true
Arrays store multiple values in a single variable.
make arr = [1, 2, 3, 4]
display(arr[1]) // Output: 2
Hashmaps (dictionaries) store key-value pairs.
make map = {"name": "Alice", "age": 25}
display(map["name"]) // Output: Alice
TLang provides several built-in functions for handling data and computations.
display(element) // Outputs the element value.
count(arr) // Returns the number of elements in an array.
push(arr, element) //Adds a new element to an array. Returns a new array with the added element.
first(arr) // Returns the first element in an array.
last(arr) // Returns the last element in an array.
rest(arr) // Returns a new array without the first element.
TODOS: // To be added!
keys(map) // Returns all keys in a hashmap
values(map) // Returns all values in a hashmap
Functions are reusable blocks of code. Supports High-Order functions & Closures.
make greet = fxn(name) {
return "Hello, " + name;
}
display(greet("Bob")); // Output: Hello, Bob
A recursive function that loops through an array and print all its element:
make loopThroughArray = fxn(arr) {
if(count(arr) == 0){
return null;
} else {
display(first(arr));
loopThroughArray(rest(arr));
return null;
}
}
make a = [74,0,1,2,3,4,5,6,7,8,9];
loopThroughArray(a);
Conditional statements control program flow.
make x = 10;
if (x > 5) {
display("x is greater than 5");
} else {
display("x is less than or equal to 5");
}