Syntax

Syntax rules

Autolang source files must use the .atl extension

Code is executed from top to bottom at file scope

Each statement is written on its own line, semicolons are not required

print("Hello ") println("World")

Code blocks

The curly braces {} define a block of code

Blocks are used in control flow statements such as if, while, and for

if (condition) { println("Condition is true") }

Comments

Use // to write a single-line comment

Everything after // on the same line is ignored

// This is a comment println("Hello") // This is also a comment

Use /* */ to write a Multi-line comment

Everything inside /* and */ will be ignored

/* This is a comment println("Hello") */ println("Hello")

Whitespace

Whitespace and indentation do not affect program behavior

Indentation is recommended for readability

if (x > 0) { println("Positive") }

Case sensitivity

Autolang is case-sensitive

Identifiers with different casing are treated as different names

val name = "John" val Name = "Doe"