Download
The latest versions for Windows and .NET 10.
Download →PascalABC.NET is a new-generation programming language for the .NET platform, designed for teaching and learning modern programming, scientific research, and application development. It combines a broad range of modern language features — type inference, tuples, slices, generics, lambda expressions, and interfaces — with simple, clear syntax that makes it possible to write concise and efficient code.
begin
var (a,b) := ReadReal2('a,b:');
Println($'{a} * {b} = {a*b}')
end.begin
var a := [12,73,25,48,9,41,36,80];
for var i := 0 to a.Length-1 step 2 do
if a[i] in 10..50 then
Print(a[i])
// 12 25 36
end.function Divisors(n: integer): List<integer>;
begin
Result := [];
for var i := 1 to n do
if n mod i = 0 then
Result.Add(i)
end;
begin
Divisors(24).Println
// 1 2 3 4 6 8 12 24
end.begin
var a := [8,2,9,4,2,6,7,4];
a.Where(x -> x mod 2 = 0) // 8 2 4 2 6 4
.Distinct // 8 2 4 6
.Order // 2 4 6 8
.Select(x -> x*x) // 4 16 36 64
.Println
end.begin
var a := [10,20,30,40,50,60];
a[1:4].Println; // 20 30 40
a[::2].Println; // 10 30 50
Println(a[^1]) // 60
end.##
function HasEqualAdjacentChars(s: string) :=
s.IsMatch('(.)\1');
'LETTER'
.Permutations
.Where(s -> not HasEqualAdjacentChars(s))
.Distinct
.Count
.Print // → 84The latest versions for Windows and .NET 10.
Download →A concise introduction to PascalABC.NET.
Open →The PascalABC.NET extension for Visual Studio Code.
Open →