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.
Syntax
NAME [[appname]] [[apptype]] [[NEWFILES]]
Remarks
The fields can appear in any order.
If appname is specified, it becomes the name of the application as it is known by OS/2 or 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 base name of the executable file becomes the name of the application.
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:
Value | Description |
WINDOWAPI | Presentation Manager (PM) or Windows application. The application uses the API provided by PM or Windows and must be executed in the PM or Windows environment. This is equivalent to the LINK option /PM:PM. |
WINDOWCOMPAT | Character-mode application to run in a text window in the PM or Windows session. This is equivalent to the LINK option /PM:VIO. |
NOTWINDOWCOMPAT | The default. Character-mode application that must run full screen and cannot run in a text window in PM or Windows. This is equivalent to the LINK option /PM:NOVIO. |
Specify NEWFILES to tell the operating system that the application supports long filenames and extended file attributes (available under OS/2 version 1.2 and later). The synonym LONGNAMES is supported for compatibility.
Example
The example below assigns the name calendar to an application that can run in a text window in PM or Windows:
NAME calendar WINDOWCOMPAT