All examples
Language

Explicit declarations and fixed bindings

Use let for fixed bindings, var for reassignment and the optional strict declaration policy to require explicit new names.

strict_declarations.aner
// Requires the updated native development runtime for --strict-declarations.
// aner check examples/strict_declarations.aner --strict-declarations
// aner run examples/strict_declarations.aner --strict-declarations
let increment = 2
var total = 10
total += increment

// let fixes the handle, while the array retains its mutable-storage contract.
let samples = Array<Int64>(size: 2, fill: 0)
samples[0] = total
samples[1] = total + increment
print(total)
print(samples[1])
// Expected output:
// 12
// 14

Make it your experiment.

With Aner 0.0.3 or newer installed, save this program as examples/strict_declarations.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.

Terminal
aner check examples/strict_declarations.aner
aner run examples/strict_declarations.aner --strict-declarations

The aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.

Requires Aner 0.0.3 or newer with strict declaration checks. This complete example uses no external files or credentials, prints 12 and 14, and writes no file. Older installed executables may reject the declaration policy flag; Install Aner 0.0.3 or newer from Downloads.

Credential setup
aner check examples/strict_declarations.aner --strict-declarations

Bundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.

Dataset sources & attribution
Install Aner