#pragma environment (C only)

Category

Object code control

Purpose

Uses C code as an assembler substitute.

The directive allows you to do the following:
  • Specify a function as an entry point other than main
  • Omit setting up a C environment on entry to the named function
  • Specify several system exits that are written in C code in the same executable

Syntax

Read syntax diagramSkip visual syntax diagram
>>-#--pragma--environment--(--identifier--+--------+--)--------><
                                          '-,nolib-'      

Defaults

Not applicable.

Parameters

identifier
The name of the function that is to be the alternate entry point.
nolib
The Language Environment® is established, but the LE runtime library is not loaded at run time. If you omit this argument, the library is loaded.

Usage

If you specify any other value than nolib after the function name, behavior is not defined.