Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-09

Freepascal 2.2.0 released

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

The Free Pascal Compiler team is pleased to announce the release of FPC 2.2.0!

An overview of most changes is available below, but some highlights are:

* Architectures: PowerPC/64 and ARM support
* Platforms: Windows x64, Windows CE, Mac OS X/Intel, Game Boy Advance, and Game Boy DS support
* Linker: fast and lean internal linker for Windows platforms
* Debugging: Dwarf support and the ability to automatically fill variables with several values to more easily detect uninitialised uses
* Language: support for interface delegation, bit packed records and arrays and support for COM/OLE variants and dispinterfaces
* Infrastructure: better variants support, multiple resource files support, widestrings are COM/OLE compatible on Windows, improved database support

Downloads are available at http://www.freepascal.org/download.var

Enjoy!

The Free Pascal Compiler Team

****************************************************************************** What's New in 2.2.0
******************************************************************************

Free Pascal 2.2.0 contains a lot of bug-fixes and new features. The work on Free Pascal 2.2.0 started halfway during the year 2005. A lot has been improved since then.

Please also see http://wiki.freepascal.org/User_Changes_2.2.0 for a list of changes which may affect the behaviour of previously working code, and how to cope with these changes.

Platforms:
* New platform: Win64. FPC is the first open source compiler for 64-bit Windows operating systems.
* New processor architecture: 64-bit PowerPC
* PowerPC/64 support for Linux
* Mac OS X on Intel (i386) is now supported
* New platform: Windows CE (Windows Mobile)
* New platform: Nintendo Game Boy Advance
* New platform: Nintendo DS
* Native support for ARM-platform
* GO32V2 DOS platform got a long needed update

Compiler:
* Internal linker for win32, win64 and wince, resulting in smaller executables, less memory used during compilation, and faster compile times for programs using large frameworks like for example the Lazarus Component Library.
* Generics (experimental)
* Bit packed arrays and records
* Resourcestrings can now be smartlinked, resulting in smaller executables
* Multiple resource files support
* pointer[low..high] syntax to pass C-style pointer arrays to procedures using open arrays
* Interface delegation
* Proper safecall implementation
* Wide strings are COM/OLE compatible on Windows
* Added several speed optimisations, for example:
* Compiler can omit stack frames (x86 and ARM)
* Compiler can store records in registers
* Tail recursion expansion
* Register renaming optimizations
* Improved optimizer for ARM CPU
* Compiler can initialise local variables, function results, and "out" parameters with several values (command line parameters -gt till -gtttt) to help find uses of uninitialised variables
* Compiler can now properly deal with paths > 255 characters in all cases
* Dwarf debug format support
* Reduced memory usage during compilation
* Lot of small bugs and compatibility fixes

RTL:
* Heap uses less memory
* Improved variants support
* Improved currency support
* Exception handling can be used without SysUtils unit
* Lot of small bug and compatibility fixes

FCL:
* Improved database support
* The obsolete sqlitedataset, interbase, fpodbc, ddg, mysqldb3 and mysqldb4 units are removed
* Lot of small bugs and compatibility fixes

Packages:
* Added a new fppkg package manager
* Improved database support
* Added Delphi compatible RichEdit unit
* Apple universal interfaces updated to r204 of the common FPC/GPC/MW interfaces
* Lot of small bugs and compatibility fixes

Free Vision:
* Now uses resourcestrings

IDE:
* Evaluate window
* Improved HTML rendering
* Improved xterm support
* Small bug fixes

Misc:
* Improved documentation
* Better cross compilation support

For a detailed list of reported bugs that are fixed in this release see the bugtracker report at http://www.freepascal.org/mantis/changelog_page.php

Reply by email

Marc Santhoff
to Joost van der Sluis: The Free Pascal Compiler team is pleased to announce the release of FPC 2.2.0! An…
Joost van der Sluis wrote
The Free Pascal Compiler team is pleased to announce the release of FPC 2.2.0!

Many thanks to all people making this happen!

Although I'm not an every day user of fpc and lazarus it's a great gift to have such mature tools for writing in a language leaving the hair on my head (in contrast to many others letting it fade to grey or fall out). ;)

****************************************************************************** What's New in 2.2.0 ******************************************************************************

That's by far the most impressing feature list I've seen for a long time. Especially the rich set of CPU and OS targets is pretty cool!

Marc

Reply by email

Daniël Mantione
to Marc Santhoff

Op Tue, 11 Sep 2007, schreef Marc Santhoff:

Show quoted text 10 lines
Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis: Since this page isn't already up: > http://wiki.freepascal.org/User_Changes_2.2.0 Can someone please give a short explanation of this item?: > * pointer[low..high] syntax to pass C-style pointer arrays to procedures > using open arrays

If you allocate dynamic sized structures using pointers it was previously troublesome to pass this to open arrays, i.e. you can now do:

procedure abc(const x:array of byte);
begin
end;
var b:Pbyte;
begin
  abc(b[0..7]);
end;

However, it also works with normal arrays (and strings) you you can now pass partial arrays:

procedure abc(const x:array of byte);
begin
end;
var b:array[0..15] of byte;
begin
  abc(b[0..9]);
end;

Daniël

Reply by email

Joost van der Sluis
to Marc Santhoff: Since this page isn't already up: Can someone please give a short explanation of this…

Op dinsdag 11-09-2007 om 14:47 uur [tijdzone +0200], schreef Marc Santhoff:

Show quoted text 10 lines
Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis: Since this page isn't already up: > http://wiki.freepascal.org/User_Changes_2.2.0 Can someone please give a short explanation of this item?: > * pointer[low..high] syntax to pass C-style pointer arrays to procedures > using open arrays
var s:string;
begin
  s := 'hello world';
  writeln(s[6,11]);
end;

Returns 'world'. But s[6,15] will give trouble! This way you can pass a subset of a dynamic array (string).

Joost.

Reply by email

Marc Santhoff
to Daniël Mantione: Op Tue, 11 Sep 2007, schreef Marc Santhoff: If you allocate dynamic sized structures…
Daniël Mantione wrote 32 lines
> Can someone please give a short explanation of this item?: > > > * pointer[low..high] syntax to pass C-style pointer arrays to procedures > > using open arrays If you allocate dynamic sized structures using pointers it was previously troublesome to pass this to open arrays, i.e. you can now do: procedure abc(const x:array of byte); begin end; var b:Pbyte; begin abc(b[0..7]); end; However, it also works with normal arrays (and strings) you you can now pass partial arrays: procedure abc(const x:array of byte); begin end; var b:array[0..15] of byte; begin abc(b[0..9]); end;

I see, pretty neat for handling array row-wise or the like, thanks.

Marc

Reply by email

Jonas Maebe

Sent to wrong mailing list (web mail ...)

----- Doorgestuurd bericht van -----
Datum: Tue, 11 Sep 2007 16:18:03 +0200
Van: Jonas Maebe
Antwoorden aan:FPC developers' list
Onderwerp: [fpc-devel] Re: [fpc-pascal] Freepascal 2.2.0 released Aan:

Marc Santhoff wrote on di, 11 sep 2007:

Show quoted text 10 lines
Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis: Since this page isn't already up: > http://wiki.freepascal.org/User_Changes_2.2.0 Can someone please give a short explanation of this item?: > * pointer[low..high] syntax to pass C-style pointer arrays to procedures > using open arrays

Note that the page above does not explain that. It only explains gotchas you may run into when compiling code which compiled/worked with the previous release of FPC, but which may now no longer compile or behave differently.

New features should be described in the documentation (although I have no idea what to search for if you want a description of the above). The page is above is a wiki page so it can be easily updated in case other issues are discovered, so it can be easily updated.

Jonas

---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

Reply by email

Marc Santhoff
to Joost van der Sluis: Op dinsdag 11-09-2007 om 14:47 uur [tijdzone +0200], schreef Marc Santhoff: var s:string;…
Joost van der Sluis wrote 22 lines
Op dinsdag 11-09-2007 om 14:47 uur [tijdzone +0200], schreef Marc Santhoff: > Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis: > > Since this page isn't already up: > > > http://wiki.freepascal.org/User_Changes_2.2.0 > > Can someone please give a short explanation of this item?: > > > * pointer[low..high] syntax to pass C-style pointer arrays to procedures > > using open arrays var s:string; begin s := 'hello world'; writeln(s[6,11]); end; Returns 'world'. But s[6,15] will give trouble! This way you can pass a subset of a dynamic array (string).

I'll surely test it later on, but one more question is important:

I read "C-style" as syntactically similar but not necessarily really comaptible to C. Would that work when handing over pascal array data to a dynamic library written in C?

I had some hard times regarding dimension order in memory and to make sure the data is stored consecutively when feeding integer and single/double arrays to a .so made in C.

Thanks so far,
Marc

Reply by email

Daniël Mantione
to Johann Glaser

Op Tue, 11 Sep 2007, schreef Johann Glaser:

Show quoted text 18 lines
Hi! > > procedure abc(const x:array of byte); > > > > begin > > end; > > > > var b:array[0..15] of byte; > > > > begin > > abc(b[0..9]); > > end; > > I see, pretty neat for handling array row-wise or the like, thanks. Is it also possible to run abc(b[2..9]); i.e. using a start-index different from 0?

Yes, you can.

Daniël

Reply by email