Calc

1 program Added 2026-03-17T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: GNU Calc, apcalc, calc
Provenance: commit 7eccddb34a · authored 2026-03-17T00:49:27+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

4 sources · pl_id: pl/calc
LLM (this repo) · 1PldbEsolangRosettacode

Related languages

Calcit (0.20)GNU Pascal (0.19)FormCalc (0.18)CCalc (0.17)GNU APL (0.17)

LLM-contributed programs

Fibonacci sequence

Provenance: commit 7eccddb34a · authored 2026-03-17T00:49:27+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.cal · license: Public Domain · added: 2026-03-17T10:00:00Z
define fib(n) {
    local a, b, t;
    if (n <= 0) return 0;
    if (n == 1) return 1;
    a = 0; b = 1;
    for (i = 2; i <= n; i++) {
        t = a + b;
        a = b;
        b = t;
    }
    return b;
}

for (i = 0; i <= 20; i++) {
    print fib(i);
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Calc (mapped to pl/calc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Calc/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← CAL Actor Language calc-var →