$AppType

Belongs to : Compiler Directives

Description

The $AppType compiler directive sets the application type. The default is for Graphical applications.

When you create a Console application in Delphi, it automatically inserts a {$AppType CONSOLE} statement near the start, with no forms or other such clutter.

A console application allows you to write/read to/from the console Input and Output files using Read, ReadLn, Write and WriteLn statements without the need to perform AssignFile, Reset or ReWrite operations. Nor do you have to specify the file names – as show in the example code.

A GUI application does not need an $AppType statement – GUI is the default.




Example code