hello.cmll
Project metadata and output.
# A minimal CMLL program
project "Hello World";
set name = "CMLL";
say "Hello from CMLL!";
show "Language: " + name;
Open .cmll sourceMACORAONE / DEVELOPER DOCUMENTATION
Multiple .cmll examples using the documented current syntax: variables, expressions, conditions, loops, functions and objects.
Project metadata and output.
# A minimal CMLL program
project "Hello World";
set name = "CMLL";
say "Hello from CMLL!";
show "Language: " + name;
Open .cmll sourceDeclarations, arithmetic and string output.
# Variables and arithmetic
set price = 12;
set quantity = 4;
set total = price * quantity;
show "Total: " + total;
Open .cmll sourceComparisons and nested if/else.
# Branch on a score
set score = 85;
if score >= 90 {
say "excellent";
} else {
if score >= 70 {
say "good";
} else {
say "keep practicing";
}
}
Open .cmll sourceArray iteration and accumulation.
# Iterate over an array and calculate a total
set total = 0;
for (n in [1, 2, 3, 4, 5]) {
total = total + n;
}
show total;
Open .cmll sourceFunction declarations, calls and return values.
# Functions can return values
func add(a, b) {
return a + b;
}
set result = add(20, 22);
show result;
Open .cmll sourceObject literals and property access.
# Objects and dot-property access
set user = {
name: "Dominex",
active: true,
tools: ["CMLL", "MacoraOne"]
};
show user.name;
show user.active;
Open .cmll sourcecmll --version
cmll --help
cmll CMLL-source-codes/examples/hello.cmllCMLL statements use semicolons because newlines are ignored by the lexer. These examples follow the current language guide; general array indexing is not assumed.
Read the CMLL language guideCMLL repository