IsDefined function (LotusScript® Language)

Tests a string expression to determine whether it is the name of a product or platform constant at run time.

Syntax

IsDefined ( stringExpr )

Elements

stringExpr

Any string expression.

Return value

IsDefined returns TRUE (-1) if stringExpr is the name of a product or platform constant at run time. Otherwise IsDefined returns FALSE (0).

Usage

The IsDefined function is used as a run-time parallel to the %If directive. It is commonly used to test the run-time value of a platform-identification or product constant that may be used to govern conditional compilation.

Note: IsDefined is not a LotusScript® keyword.

LotusScript® implements the platform constants in the following table as product #defines. When one of these is used as productConst, the LotusScript® compiler does not call the product to evaluate productConst. LotusScript® itself evaluates the constant as TRUE or FALSE. The value of each constant depends on the platform LotusScript® is running on.

Constant

Platform or functionality

WIN16

Windows with 16-bit API

WIN32

Windows with 32-bit API

WINDOWS

Any Windows platform type (any of the preceding WINxx constants)

UNIX

Any UNIX type

LINUX

Linux

MAC

Macintosh System 7

OLE

OLE-2 is available

MAC68K

Macintosh Motorola 68000 version (running on either a 68xxx Macintosh or the PowerPC®)

MACPPC

Macintosh PowerPC® version

The constants can define platforms at different levels and are not mutually exclusive. For example, on WinNT, the platform returned can be WIN32_X86, WIN32, or WINDOWS.

Product constants are defined by, and are specific to, the host product, for example Notes® and so on. Refer to the product's documentation for a list of product-defined constants.