Variables
A variable is a name for a value. Create one with ধৰা (dhora), which means “suppose” or “let”, just like in Assamese maths books: ধৰা হওক x = ৫.
Create a variable
dhora nogor = "Guwahati"
dhora jonoxonkhya = 1128000
kowa(nogor, jonoxonkhya)
Guwahati 1128000
Names can use Assamese or English letters, digits and _, but can’t start with a digit. Assamese conjuncts like ক্ষ work as you’d expect.
Change a value
After a variable exists, assign a new value with = (without ধৰা):
Watch out
Using a name before creating it is an error (R001). So is creating the same name twice in the same block (R002).
Variables without a value
A variable created without a value holds খালী (khali, “empty”):
Scope
A variable lives inside the block { … } where it was created. Code inside a block can see the variables outside it, but not the other way round:
ধৰা বাহিৰ = "বাহিৰ"
যদি (সঁচা) {
ধৰা ভিতৰ = "ভিতৰ"
কোৱা(বাহিৰ, ভিতৰ)
}
কোৱা(বাহিৰ)
বাহিৰ ভিতৰ বাহিৰ
dhora bahir = "bahir"
jodi (xosa) {
dhora bhitor = "bhitor"
kowa(bahir, bhitor)
}
kowa(bahir)
bahir bhitor bahir
Ending statements
Each statement ends at the end of the line. To put several on one line, separate them with ; or the danda ।: