How khali works
You get khali from a variable declared without a value, a list index past the end, an object field that was never set, a function that does not lautao anything, and pucho() once the input has run out.
Check for it with == khali or != khali. Because it is falsy, agar (value) also skips it — but remember that 0 and "" are falsy too.
prakar(khali) returns khali.
Syntax
rakho x = khali;
agar (x == khali) { ... }Runnable example
Same idea in JavaScript and Python
const user = { naam: "Sam" };
console.log(user.email); // undefined
if (user.email == null) console.log("Email abhi set nahi hai");user = {"naam": "Sam"}
print(user.get("email")) # None
if user.get("email") is None:
print("Email abhi set nahi hai")Common mistakes
Writing "khali" as text
"khali" in quotes is just a five-letter string and is never equal to the real khali value.
agar (user.email == "khali") { }rakho user = {};
agar (user.email == khali) { bol("missing"); }khali: frequently asked questions
What is null in AltFLang?
khali. It represents a missing or empty value and is treated as false in conditions.
Does reading a missing list index crash the program?
No. Reading a position that does not exist gives khali, so check the index against lambai(list) when it matters.