asomiya 0.2.0

Control flow

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 | কোৱা(ক + খ)
  |        ^
  1. The kind and code, like R001. The letter says when it happened: L while reading the text, P while understanding the grammar, R while running.
  2. The message, in Assamese or English (choose with --lang en, or the switch in the playground).
  3. The place: file, line and column, and the line itself with ^ under the problem.

Common mistakes

CodeWhat it meansFix
R001A name was used before it was created.Create it with ধৰা first, or check the spelling.
P007Two statements on one line, or a typo in a keyword.Put them on separate lines, or fix the keyword.
R003An operator was used on the wrong kind of value, like "ক" - ১.Convert with সংখ্যা() or পাঠ().
R007A condition isn’t সঁচা or মিছা.Compare: যদি (ক > ০).
R008The 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.