Only noticable language difference is that D4 does not have exit(something)
Clearly you don't keep track of what FPC has to offer over and above Delphi 4-7. Here is a short (incomplete) list of language features or additions:
- For-in loop support
- Sealed and Abstract classes
- Better support for Delphi-compatible classes - this includes newer Delphi versions too.
- Advanced record syntax
- Enumerators in records
- Support for class and record helpers
- Generic records, arrays and procedural types
- Scoped enumerations
- Custom deprecated messages
- Support for the Objective-Pascal dialect
- Constref parameter modifier
- Basic ISO Standard Pascal support
- Support for nested procedure variables
- Support for non-local goto's
- Support for &-escaping of keywords
- Support for univ parameters in MacPas mode
- CExtended floating point type
- SAR intrinsics
- ROL/ROR intrinsics
- Bitscan intrinsics
- Boolean16, Boolean32 and Boolean64 types
- Anonymous inherited calls
- Overload modifier must be present in the interface
- AnsiStrings are now codepage-aware
- Variant overload preference for string types
- Variant conversion preference for widechar
- Default values in implementation but not in interface/forward declaration
- Default values are now properly typechecked
- "strict protected" visibility modifier
- Support for type helpers added
- "strict protected" and "protected" visibility modifier in extended records
- "static" directive on non-class methods
- "static" directive on class operators
- Classes implementing forward-declared interfaces
- Using the function name as alias for loading its current result value in MacPas mode
- nostackframe forbidden for Pascal subroutines
- Conversion preference of pansichar to various string types
- Comparative operators can have any result type
- True and False are not keywords anymore
- For-in loop variable cannot be assigned to anymore
- Casting integer variables to floating point
Then there is the fact that FPC is a 16bit, 32bit and 64bit compiler. Has many various language and CPU optimisations, supports Java Bytecode output too, supports a massive amount of target CPU's and OS Platforms.
Free Pascal 2.6 and 3.0 is currently available for the following platforms:
- Linux-i386
- Linux-x86_64 (amd64)
- Linux-powerpc
- Linux-sparc
- Linux-ARM
- Win32-i386 (2000/XP, WinNT or later)
- Win64-x86_64 (XP or later)
- Wince-ARM (cross compiled from win32-i386)
- FreeBSD-i386
- FreeBSD-x86_64
- Mac OS X/Darwin for PowerPC (32 and 64 bit)
- Mac OS X/Darwin for Intel (32 and 64 bit)
- iOS (ARM and AArch64/ARM64) and iPhoneSimulator (32 and 64 bit)
- OS/2-i386 (OS/2 Warp v3.0, 4.0, WarpServer for e-Business and eComStation)
- Haiku-i386
- GO32v2-i386
- Nintendo Gameboy Advance-ARM (cross compile from win32-i386)
- Nintendo DS-ARM (cross compile from win32-i386)
- Nintendo Wii-powerpc (cross compile from win32-i386)
- AIX 5.3 and later for PowerPC (32 and 64 bit)
- Java JVM (1.5 and later) and Android Dalvik (Android 4.0 and later)
- Android (ARM, i386, MIPS) via cross-compiling.
These are just the official ones! There are still many unofficial ones too, like other *BSD targets, IBM Mainframes etc.
References:
http://wiki.freepascal.org/FPC_New_Features_2.4.2http://wiki.freepascal.org/User_Changes_2.6.2http://wiki.freepascal.org/User_Changes_3.0Yeah, so the language feature list is a bit more than simply an enhanced exit(...) function. ;-)
Needless to say FPC is well beyond what D7 could do or offered.