Modula-3

1 program Added 2025-10-22T15:04:00Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: M3
Provenance: commit 97168aa010 · authored 2025-10-22T17:04:00+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

6 sources · pl_id: pl/modula-3
LLM (this repo) · 1LinguistWikipediaHyperpolyglotRosettacodeWikidata · Q1928222

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsimperative · structured · procedural · modular · concurrent · object-oriented · generic
Typingstrong, static, safe or if unsafe explicitly safe isolated
Designed byDEC Olivetti elego Software Solutions GmbH · Luca Cardelli · James Donahue · Lucille Glassman · Mick Jordan · Bill Kalsow · Greg Nelson
First appeared1988
Influenced byALGOL · Euclid · Mesa · Modula-2 · Modula-2+ · Oberon · Pascal
Homepagehttp://www.modula3.org

Extensions claimed by this language

4 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.i3linguistprimary16.9K files
.iglinguistsecondary5.7K files
.m3linguistsecondary28.6K files
.mglinguistsecondary13.4K files

Related languages

Modula-1 (0.44)Modula-2 (0.44)Modula (0.40)Modula-2+ (0.29)Modus (0.25)

LLM-contributed programs

Hello World with Command Line Arguments

Provenance: commit 97168aa010 · authored 2025-10-22T17:04:00+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.m3 · license: MIT · added: 2025-10-22T15:04:00Z
MODULE Hello EXPORTS Main;

IMPORT IO, Params, Text;

BEGIN
  IO.Put("Hello world!\n");
  FOR i := 1 TO Params.Count-1 DO
    IO.Put(Params.Get(i));
    IF i < Params.Count-1 THEN IO.Put(" ") END;
  END;
  IF Params.Count > 1 THEN IO.Put("\n") END;
END Hello.

Real programs from Software Heritage

2 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
TextVBTClass.i3 · 809 B · ext .i3 · seen 2× in SWH
via unique-primary
swh:1:cnt:cfce8a258d9943c87af3e0bb2bcab3952736b86b;origin=https://github.com/modula3/cm3;anchor=swh:1:rev:f0e4a5be0778e2e80dd8e2d852ada0bac641abdd;path=/m3-ui/ui/src/split/TextVBTClass.i3
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
(* Copyright (C) 1992, Digital Equipment Corporation                         *)
(* All rights reserved.                                                      *)
(* See the file COPYRIGHT for a full description.                            *)
(*                                                                           *)
(* File: TextVBTClass.i3, coded by cgn Sun Jun 28 16:13:38 1987 *)
(* Last modified on Mon Feb 24 13:54:53 PST 1992 by muller  *)
(*      modified on Tue Nov 19 19:12:00 PST 1991 by gnelson *)
(*      modified on Wed Sep 11  9:50:53 PDT 1991 by msm *)
<*PRAGMA LL*>

INTERFACE TextVBTClass;

IMPORT TextVBT;

REVEAL TextVBT.T <: T;

TYPE T = TextVBT.Public OBJECT
  <* LL >= {SELF} *>
  text: TEXT
  END;

(* If you modify the "text" field, you must call "VBT.Mark". *)

END TextVBTClass.
Example.i3 · 267 B · ext .i3 · seen 2× in SWH
via unique-primary
swh:1:cnt:607ba5fc5935069ffcab786da81e82a996fdddc9;origin=https://github.com/OS2World/DEV-SAMPLES-Modula;anchor=swh:1:rev:9f5ce4615c046514bcd2013dbda21e20f9c3a475;path=/test/m3/test/anetobj/server/src/Example.i3
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
INTERFACE Example;

IMPORT NetObj;

FROM Thread IMPORT Alerted;

EXCEPTION Reject(TEXT);

TYPE
  T = NetObj.T OBJECT METHODS
    setText (name: TEXT): TEXT RAISES {Reject, NetObj.Error, Alerted};
    sayGoodBye () RAISES {NetObj.Error, Alerted};
  END;

END Example.

Contribute — propose a file extension

Tell us where to find evidence about Modula-3 (mapped to pl/modula-3). 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/Modula-3/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Modula-2R10 modula-3-star →