All examplesLanguage Install Aner
Types and arithmetic
Explore typed bindings, strings, booleans, comparisons, and numerical expressions.
// Prefer let for bindings that are not reassigned; types can be inferred or explicit.
fn main() -> Unit {
let count: Int64 = 7;
let weight = 72.5;
let label: String = "Synthetic sample";
let included: Bool = count > 0 && weight > 0.0;
print(label);
print(count / 3);
print(count % 3);
print(Float64(count) / 2.0);
print(included);
print("sample" == "sample");
}
// Expected output:
// Synthetic sample
// 2.3333333333333335
// 1
// 3.5
// true
// true
Make it your experiment.
Use Aner 0.0.3 or newer. Save this program as examples/scalars.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/scalars.aner
aner run examples/scalars.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Bundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution