Object Pascal

1 program Added 2025-10-28T05:51:41Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: Delphi, Free Pascal
Provenance: commit c67b5a69ff · authored 2025-10-28T06:51:41+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

3 sources · pl_id: pl/object-pascal-2
LLM (this repo) · 1WikipediaWikidata · Q633894

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 · object-oriented · functional (delphi dialect only) · component-based · event-driven · generic
Typingstatic and dynamic (dynamic typing through variants, array of const, and rtti), strong, safe
Designed byApple Computer (initial) Borland International · Larry Tesler (Apple) Niklaus Wirth (for Apple) Anders Hejlsberg (Borland)
First appeared1986
Influenced byPascal · Simula · Smalltalk

Related languages

Pascal (0.47)Delphi (0.43)Clascal (0.42)Free Pascal (0.33)Pascal Script (0.23)

LLM-contributed programs

Simple Class Example in Object Pascal

Provenance: commit c67b5a69ff · authored 2025-10-28T06:51:41+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.pas · license: Public Domain · added: 2025-10-28T05:51:41Z
program SimpleClassExample;

{$mode objfpc}{$H+}

uses
  Classes;

type
  { TDog }

  TDog = class
  private
    FName: string;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Bark;
    property Name: string read FName write FName;
  end;

{ TDog }

constructor TDog.Create;
begin
  inherited Create;
  Writeln('A dog is born');
  FName := 'Fido';
end;

destructor TDog.Destroy;
begin
  Writeln('A dog has died');
  inherited Destroy;
end;

procedure TDog.Bark;
begin
  Writeln(FName, ' says Woof!');
end;

var
  ADog: TDog;
begin
  ADog := TDog.Create;
  try
    ADog.Bark;
    ADog.Name := 'Rover';
    ADog.Bark;
  finally
    ADog.Free;
  end;
end.

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 Object Pascal (mapped to pl/object-pascal-2). 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/Object Pascal/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Object oriented Thue Object REXX →