This directive is currently only supported on the following targets: Win32, Mac, OS2 and AmigaOS. On other targets, the directive is ignored.
The {$APPTYPE XXX} accepts one argument which specifies what kind of application is compiled. It can have the following values:
Note that on Mac OS such applications cannot take command line options, nor return a result code. They will run in a special terminal window, implemented as a SIOW application, see the MPW documentation for details.
On os/2, these applications can run both full-screen and in a terminal window.
linux applications are always console applications. The application itself can decide to close the standard files, though.
On os/2 and Mac OS, the GUI application type creates a GUI application, as on Windows. On os/2, this is a real Presentation Manager application.
Care should be taken when compiling GUI applications; the Input and Output files are not available in a GUI application, and attempting to read from or write to them will result in a run-time error.
It is possible to determine the application type of a Windows or Amiga application at runtime. The IsConsole constant, declared in the Win32 and Amiga system units as
contains True if the application is a console application, False if the application is a GUI application.