The NAME Statement

The NAME statement identifies the executable file as an application (rather than a DLL). It can also specify the name and application type. The NAME or LIBRARY statement must precede all other statements. If NAME is specified, the LIBRARY statement cannot be used. If neither is used, the default is NAME and LINK creates an application.

Summary: Syntax

NAME [[appname]] [[apptype]] [[NEWFILES]]

Summary: Remarks

The fields can appear in any order.

If appname is specified, it becomes the name of the application as it is known by Windows. This name can be any valid filename. If appname contains a space, begins with a nonalphabetic character, or is a reserved word, surround appname with double quotation marks. The name cannot exceed 255 characters (not including surrounding quotation marks). If appname is not specified, the application is given the same base name as the project file.

If apptype is specified, it defines the type of application. This information is kept in the executable-file header. The apptype field can take one of the following values:

WINDOWAPI

Windows application. The application uses the API provided by Windows and must be executed in the Windows environment.

WINDOWCOMPAT

Character-mode application to run in a text window in the Windows session.

NOTWINDOWCOMPAT

The default. The character-mode application must run full screen and cannot run in a text window in Windows.

The optional NEWFILES keyword is not used by Windows.

Summary: Example

The example below assigns the name calendar to an application that can run in a text window:

NAME calendar WINDOWCOMPAT