Understanding errors
Everyone makes mistakes when programming. Asomiya’s error messages are designed to help you fix them quickly.
Reading an error
ধৰা ক = ৫
কোৱা(ক + খ)
Output
runtime error [R001]: Undefined variable "খ" (declare it first with "ধৰা")
--> program.asom:2:10
|
2 | কোৱা(ক + খ)
| ^- The kind and code, like
R001. The letter says when it happened:Lwhile reading the text,Pwhile understanding the grammar,Rwhile running. - The message, in Assamese or English (choose with
--lang en, or the switch in the playground). - The place: file, line and column, and the line itself with
^under the problem.
Common mistakes
| Code | What it means | Fix |
|---|---|---|
R001 | A name was used before it was created. | Create it with ধৰা first, or check the spelling. |
P007 | Two statements on one line, or a typo in a keyword. | Put them on separate lines, or fix the keyword. |
R003 | An operator was used on the wrong kind of value, like "ক" - ১. | Convert with সংখ্যা() or পাঠ(). |
R007 | A condition isn’t সঁচা or মিছা. | Compare: যদি (ক > ০). |
R008 | The program ran too long (probably an endless loop). | Make sure the loop’s condition can become মিছা. |
Hints for typos
dhora x = 5
kowaa(x)
Output
runtime error [R001]: Undefined variable "kowaa" — did you mean kowa (কোৱা)?
--> program.asom:2:1
|
2 | kowaa(x)
| ^^^^^Every error code is listed in the error reference, with an example of what causes it.