Your First Program

Let's write your first IndoriLang program and see it in action!

Hello World

Create a file called hello.il and add the following code:

indori
# Hello World in IndoriLang
bhiya_bol("Ram Ram bhiya log!");
poha_time();

Now run it with:

bash
indori run hello.il

Variables and Math

IndoriLang supports variables and arithmetic operations:

indori
# Variables and arithmetic
kaam x laa_re 10;
kaam y laa_re 20;
kaam sum laa_re x + y;

bhiya_bol("Sum: " + sum);
bhiya_bol("Product: " + (x * y));

In IndoriLang, kaam x laa_re 10 means "let x = 10" in JavaScript.

Conditionals

Use agar_re (if) and warna_re (else) for conditionals:

indori
# Conditionals
kaam age laa_re 18;

agar_re (age >= 18) {
  bhiya_bol("Bilkul adult ho re!");
} warna_re {
  bhiya_bol("Abhi baccha hai!");
}

What's Next?

Now that you've written your first program, explore more features: