FPC New Features 3.2.0

This is an old revision of FPC New Features 3.2.0, edited by Marcov at . The current revision is 133294.

/* i8086-msdos */

About this page

FPC 3.2.0 has been released on June 19th, 2020.

Below you can find a list of new features introduced since the previous release, along with some background information and examples.

A list of changes that may break existing code can be found at User Changes 3.2.

All systems

Compiler options

Default unit scopes

Language

Support for interfacing with C blocks functionality

Support for Default Namespaces

Dynamic Arrays supported by Insert()

Dynamic Arrays supported by Delete()

Dynamic Arrays supported by Concat()

Dynamic Arrays have built in + operator support

Dynamic Array constants and variable initialization

Dynamic Arrays constructors

More settings supported by $Push/$Pop

Support for threadvar sections inside class and record types

Support for Freestanding Generic Routines

unit UTestObjFPCSyntax;

{$mode ObjFPC}

interface

generic function Add<T>(const Arg1, Arg2: T): T;

implementation

generic function Add<T>(const Arg1, Arg2: T): T;
begin
  Result := Arg1 + Arg2;
end;

end.
program TestObjFPCSyntax;

{$mode ObjFPC}{$H+}

uses
  UTestObjFPCSyntax;

begin
  Writeln(specialize Add<String>('Hello', 'World'));
  Writeln(specialize Add<LongInt>(23, 19));
end.
unit UTestDelphiSyntax;

{$mode Delphi}

interface

function Add<T>(const Arg1, Arg2: T): T;

implementation

function Add<T>(const Arg1, Arg2: T): T;
begin
  Result := Arg1 + Arg2;
end;

end.
program TestDelphiSyntax;

{$mode Delphi}

uses
  UTestDelphiSyntax;

begin
  Writeln(Add<String>('Hello', 'World'));
  Writeln(Add<LongInt>(23, 19));
end.

Management operators for record types

Method RTTI for interfaces

Support for helper types extending interface types

Support for "IsManagedType" intrinsic

Support for PE/COFF metadata directives

Support for WinAPI directive

Units

rtl-generics units

Rtti unit

ProcessUnicode unit

Registry unit

CHM package

Text-mode IDE

GDB/MI support

macOS/iOS

New iosxwstr unit

Cocoaint units updated

i8086-msdos

Huge memory model

Internal assembler (object writer)

Internal linker

FarAddr internal function

Near and far procedure variables

type
  TFarProc = procedure(a, b: Integer); far;
  TNearProc = procedure(a, b: Integer); near;

Near procedure variables are 2 bytes long, so they contain only an offset. They are invoked with a near call instruction. Far procedure variables are 4 bytes long (16-bit offset + 16-bit offset) and are invoked with a far call. Note that you cannot simply convert a near procedure to a far procedure, by just filling in the segment part, because the call model is also different between near and far procedures. A far call instruction pushes a 4-byte far (segment:offset) return address and the function must terminate with a far return instruction - retf. A near call instruction pushes only a 2-byte offset on the stack and the function must terminate with a near return instruction - retn.

i386-go32v2

A new archive was added that has alternative builds of the textmode IDE. Various compilation options like with and without VESA support (VESA builds have problems with some windows drivers), and various GDB options. The archive is available via FTP: IDE alternative builds(60MB)

x86_64-win64

Support for Microsoft's vectorcall calling convention

New compiler targets

Support for the AArch64 target

Support for the Linux/ppc64le target

Support for the Android/x86_64 target

Support for the i8086-win16 (16-bit Windows) target

New Features from other versions

Lazarus - Release Notes and GIT Branch with Release Fixes

Release notes for Version:

0.9.24 | 0.9.26 | 0.9.28 | 0.9.28.2 | 0.9.30 | 1.0 | 1.2 | 1.4 | 1.6 | 1.8 | 2.0 | 2.2 | 3.0 | 4.0 | 5.0

Fixes branch (How to merge):

0.9 | 1.0 | 1.2 | 1.4 | 1.6 | 1.8 | 2.0 | 2.2 | 3.0 | 4.0

Free Pascal Compiler - User Changes (Release Notes)