Skip to main content
Skip to content

Variables keyword

pakka — const (declare a constant)

pakka declares a name whose value cannot be reassigned. Use it for values that should never change while the program runs.

Meaning: "fixed, for sure" — this name will always point to this value

How pakka works

The syntax mirrors rakho: pakka GST = 18;. Any later GST = 12; stops the program with a runtime error that names the constant, which catches accidental overwrites early.

Many programmers write constant names in CAPITALS so they stand out, but AltFLang does not require it.

pakka locks the name, not the contents. If a constant holds a list, jodo() can still add items to that same list — you just cannot point the name at a different list.

Syntax

syntax
pakka NAAM = value;

Runnable example

Expected output

Press Run to try it

GST: 90[Ravi, Anu]

Same idea in JavaScript and Python

JavaScript
const GST = 18;
let daam = 500;
console.log("GST:", daam * GST / 100);
Python
GST = 18  # Python has no true constants; CAPITALS is the convention
daam = 500
print("GST:", daam * GST / 100)

Common mistakes

Trying to change a constant

Reassigning a pakka name is a runtime error. If the value really needs to change, declare it with rakho instead.

Galat
pakka LIVES = 3;
LIVES = LIVES - 1;
Sahi
rakho lives = 3;
lives = lives - 1;
bol(lives);

pakka: frequently asked questions

What is the difference between rakho and pakka?

Both create a name in the current block. A rakho variable can be reassigned; a pakka constant cannot, and trying to do so stops the program with an error.

Can I add items to a pakka list?

Yes. pakka prevents the name from being pointed at a new value, but the list itself can still be changed with jodo(), nikalo() or index assignment.