KorvaqScrip is a beginner-friendly programming language that features a clean and straightforward syntax, making it easy for developers to write clear, concise code. KorvaqScrip files use the .kq
file extension, and the language is built around a few simple constructs and data types for fast learning and efficient coding.
Statements in KorvaqScrip are terminated with a semicolon (;
), and code blocks are wrapped in braces ({}
).
let
to declare variables that can be reassigned (e.g., let x = 5;
).make
to declare variables that cannot be changed after assignment (e.g., make y = 3;
).delvar
to delete variables and free memory (e.g., delvar x;
). To clear all variables at once, use delvar all;
.let sum = 5 + 10;
).let greeting = "Hello, World!";
).true
or false
(e.g., let isActive = true;
).if
and else
to implement branching logic (e.g., if (x > 5) { ... }
).loop
for range-based iteration and while
for condition-based iteration (e.g., while (example == false) { ... }
).
Functions in KorvaqScrip are defined using the func
keyword, accepting parameters and optionally returning values (e.g., func addVal(a, b) { ... }
).
Use show
to display output in the console (e.g., show "Hello, World!";
).
KorvaqScrip supports assignment, arithmetic, and logical operations through expressions.
Arrays are declared using square brackets ([]
) and can hold multiple values (e.g., let numbers = [1, 2, 3];
). You can add elements with arrayadd
, get the length of an array with arraylength
, and access elements using the index (e.g., arrayName[index]
).
Add single-line comments using //
to annotate your code.
Use the connect
keyword to link multiple .kq
files together.
Run asynchronous code using the async {}
block to handle non-blocking operations.
File handling is done via the read
keyword, available in the KorvaqShell environment for reading files from the filesystem.
let
for variable declarations unless immutability is necessary.delvar
and delvar all;
to avoid memory leaks.KorvaqScrip is crafted to simplify programming without sacrificing essential functionality. Whether you are a beginner or an experienced developer, KorvaqScrip offers the tools you need to write efficient, maintainable code.
For more detailed documentation, check out our documentation page.