encyclopegia.org

PascalABC.NET

PascalABC.NET is a high-level general-purpose programming language supporting multiple paradigms. PascalABC.NET is based on Delphi's Object Pascal, but also has influences from C#, Python, Kotlin, and Haskell. It is distributed both as a command-line tool for Windows (.NET framework), Linux and MacOS (Mono), and with an integrated development environment for Windows and Linux, including interactive debugger, IntelliSense system, form designer, code templates and code auto-formatting. PascalABC.NET is implemented for the .NET framework platform, so that it is compatible with all .NET libraries and utilizes all the features of Common Language Runtime, such as garbage collection, exception handling, and generics. Some language constructions, e.g. tuples, sequences, and lambdas, are based on regular .NET types. PascalABC.NET is ideologically close to Oxygene, but unlike it, provides high compatibility with Delphi.

PascalABC.NET is a high-level general-purpose programming language supporting multiple paradigms. PascalABC.NET is based on Delphi's Object Pascal, but also has influences from C#, Python, Kotlin, and Haskell. It is distributed both as a command-line tool for Windows (.NET framework), Linux and MacOS (Mono), and with an integrated development environment for Windows and Linux, including interactive debugger, IntelliSense system, form designer, code templates and code auto-formatting. PascalABC.NET is implemented for the .NET framework platform, so that it is compatible with all .NET libraries and utilizes all the features of Common Language Runtime, such as garbage collection, exception handling, and generics. Some language constructions, e.g. tuples, sequences, and lambdas, are based on regular .NET types. PascalABC.NET is ideologically close to Oxygene, but unlike it, provides high compatibility with Delphi. • loop statement loop 10 do Write('*'); • for loop with a step for var i:=1 to 20 step 2 do Print(i); • foreach loop with an index foreach var c in Arr('a'..'z') index i do if i mod 2 = 0 then Print(c); • a..b ranges (1..10).Printlines • short function definition syntax function Sum(a,b: real) := a + b; • method implementation can be placed inside a class definition type Point = class x,y: real; procedure Output; begin Print(x,y); end; end; • sequence of T type as an abstraction of arrays, lists and sets var seq: sequence of integer := Arr(1..10); seq.Println; seq := Lst(11..100); seq.Println; seq := HSet(1..20); seq.Println; • lambda functions var a := ArrGen(10,i -> i*i); • auto classes - classes with an automatically generated constructor type Point = auto class x,y: real; end; var p := new Point(2,5); • one-dimensional and multi-dimensional array slices var m: array [,] of integer := MatrGen(3,4, (i,j) -> i+j+1); Println(m); // [[1,2,3,4],[2,3,4,5],[3,4,5,6 Println(m[:2,1:3]); // [[2,3],[3,4 Some other features such as inline variable declarations, type inference, and for statement with a variable declaration are standard in the current version of Delphi. However, PascalABC.NET pioneered these features in 2007, while in Delphi they were implemented in 2018. // denotes that the main program will be written without enclosing begin-end var f: real -> real := x -> x*x; Here is an example of superposition of two functions: function Super (f: T1 -> T2; g: T -> T1): T -> T2 := x -> f(g(x)); var f: real -> real := x -> x*x; var fg := Super(f,Sin); var gf := Super(Sin,f); Print(fg(2)); Print(gf(2)); Superposition operation is defined in the standard library: var f: real -> real := x -> x*x; Print((f*Cos)(2)); Print((Cos*f)(2)); In the book "How To Program Effectively In Delphi" and in the corresponding video tutorials, Dr. Kevin Bond, a programmer and a Computer Science teaching specialist, notes that PascalABC.NET has powerful functional programming capabilities which are missing in Delphi. As an example, partial function application is demonstrated: begin var f: integer -> integer -> integer := x -> y -> x + y; Writeln(f(2)(6)); end. begin var (a,b) := ReadInteger2; // read input into tuple of two variables var sum := 0; // type auto-inference for var i:=a to b do sum += i*i; Print($'Sum = {sum}') // string interpolation end. function SumSquares(a,b: integer): integer; begin Result := 0; for var i := a to b do Result += i * i end; begin var (a,b) := ReadInteger2; Print($'Sum = {SumSquares(a,b)}') end. This solution uses .NET extension methods for sequences and PascalABC.NET-specific range (a..b) . begin var (a,b) := ReadInteger2; (a..b).Sum(x -> x*x).Print // method chaining with lambda expressions end. This solution demonstrates PascalABC.NET-specific short function definition style. type Algorithms = class static function SumSquares(a,b: integer) := (a..b).Sum(x -> x*x); static function SumCubes(a,b: integer) := (a..b).Sum(x -> x*x*x); end; begin var (a,b) := ReadInteger2; Println($'Squares sum = {Algorithms.SumSquares(a,b)}'); Println($'Cubes sum = {Algorithms.SumCubes(a,b)}') end. It is possible to write programs without usage of PascalABC.NET standard library. All standard .NET Framework classes and methods can be used directly. uses System; // using .NET System namespace begin var arr := Console.ReadLine.Split( new char[](' '), StringSplitOptions.RemoveEmptyEntries ); var (a,b) := (integer.Parse(arr[0]),integer.Parse(arr[1])); var sum := 0; for var i:=a to b do sum += i*i; Console.WriteLine($'Sum = {sum}') end.

References

No reference rows published for this article.

Cite this article

MLA

"PascalABC.NET." encyclopegia.org, 2026, https://encyclopegia.org/wiki/pascalabc-net. Accessed 24 November 2026.

Chicago

"PascalABC.NET." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/pascalabc-net.

APA

encyclopegia.org. (2026). PascalABC.NET. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/pascalabc-net

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375984079 · 0.5 · snapshot enwiki-001375984079

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.