Project Structure
VDX programs are simple — each .vdx file contains top-level statements and/or class declarations. There is no special project layout required.
Minimal project
my-project/
main.vdxRun it with:
vdx main.vdxFile extension
All VDX source files use the .vdx extension. The VDX interpreter only accepts .vdx files.
Entry point
VDX does not have a main() function. Instead, top-level statements run top-to-bottom when the file is executed. Inside a class body, functions are registered first, then statements run in order. Top-level functions (outside a class) are also registered before any statements execute.
// Top-level functions are registered first
fn sayHi() {
print("hi");
}
// Then statements run in order
sayHi();
print("done");Comments
Line comments start with //. There are no block comments yet.
// This is a comment
print("hello"); // inline comment