Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Language related articles

Bahasa Indonesia ยท English

Back to Compiler development articles

For a better updated language support list, see also Delphi language features which FPC does not have.

Things FPC 2.x.x currently doesn't support

Things FPC 1.9.x partially support

02:56, 1 Jan 2005 (CET)

The heavily variants using package DECAL has been ported recently and worked fine. So I think the variants problems are mostly over, and only atypical conversions miss. (that can be usually fixed easily if you submit a bug with a simple example that works in Delphi and not in FPC). However some RTL support (the wrapper classes) are largely unimplemented

New in 1.9.x (not yet in the docs)

For new rtl related stuff have a look at New in the 1.9.x rtl (not yet in the docs).

SSE Usage

To determine the supported instruction set, use the is_sse_cpu and is_sse2_cpu of the mmx unit. Because the sse code is usually faster than x87-fpu code, it's recommended to use these switches for heavy floating point calculations. If you want an application which runs on all fpu architectures, a possible solution is to put the code into an include file and include this file twice into your program: once compiled with e.g. -Cfsse2 and once without. Use the e.g. is_sse2_cpu variable to select the appropriate code:

pascal
{$fputype x87}
procedure calc_x87;
{$i mymathcode.inc}
pascal
{$fputype sse2}
procedure calc_sse2;
{$i mymathcode.inc}
pascal
begin 
  if is_sse2_cpu then
    calc_sse2
  else
    calc_x87;
end;

New in 2.0.x

UTF-8 support

Support for utf-8 strings inside '...' has been added. The encoding can be either selected by passing -Fcutf8 on the command line, using the directive $codepage utf8 or adding the utf-8 signature $ef $bb $bf at the beginning of a file. Strings with chars>=$80 are converted to widestrings and handled internally as widestrings. Unicode chars > 65535 can't be represented this way, this will cause an error message.

New in 2.1.x

Unaligned Keyword

When typecasting a variable as "unaligned" you tell compiler that this variable should be read or write to one byte at a time.This is usefull on those systems that require aligned data accesses. This is currently only implemented on arm cpus.

Ideas for new stuff


From the Free Pascal wiki, page "Language related articles", as it stood on 2022-09-22 after a change by SamB, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .