E_ENTER

Enter a new environment

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall E_ENTER([D_SHARE|D_NEW])

D_SHARE

(optional) Shared display.  (n)

D_NEW

(optional) New display. (default)  (n)

E_ENTER defines a new environment and determines whether the display is shared.

Passing D_SHARE flags the display as shared. This means that the new environment accesses the previous environment’s menu bar, menu columns, toolbars, and screen body. However, the display is owned by the environment that defined it, and although the new environment can modify the menu bar and toolbars, it cannot delete local menu columns, toolbars, or windows. If you modify a shared display, that modification will affect the previous environment.

If D_NEW is passed, the display is also created with the previous environment’s menu bar, menu columns, toolbars, and screen body. However, if you make a modification (for example, removing a menu column or toolbar), that modification will not affect the previous environment.

E_ENTER performs the following operations:

You do not need to call E_ENTER after a U_START, as U_START automatically enters the first environment.

Note that even though you define a new environment, all previous environments still exist. Suppose, for example, that you have passed some global file channels and windows created in the caller’s current environment to a routine. Even if you enter a new environment, you can use the passed channels and windows. Although they are not owned by the new environment, they still exist and are accessible. The non-owning environment, however, cannot delete windows and channels.

This example defines a new environment with a shared display.

xcall e_enter(D_SHARE)