Getting Started
MLang is a statically typed, interpreted scripting language. Every program begins in a main() function.
Install
bash
curl -fsSL https://lizzyman04.github.io/mlang/install.sh | shYour first program
Create hello.mth:
mlang
main() {
print("Hello, MLang!");
}Run it:
bash
mlang hello.mthOutput:
Hello, MLang!Variables
MLang is statically typed. Declare variables with an explicit type:
mlang
main() {
int age = 25;
dec pi = 3.14159;
txt msg = "ready";
bool ok = true;
print(age + 1);
print("Message: " + msg);
}Control flow
mlang
main() {
int n = 7;
if n > 5 {
print("big");
} else {
print("small");
}
for i in 0..5 {
print(i);
}
}Next steps
- Installation options — add
mlangto yourPATH - Examples — more complete programs
- Language reference — full syntax guide