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 (Windows 3.1)

WIN32

Windows with 32-bit API (Windows NT or Windows 95)

WINNT

Windows NT

WIN95

Windows 95

WIN40

Windows 95 or Windows NT 4.0

WIN98

Windows 98

WIN2K

Windows 2000

WINDOWS

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

HPUX

HP/UNIX 9.X or greater

SOLARIS

Sun/OS 5.0 or greater

UNIX

Any UNIX type (HP_UX or Solaris)

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, WINNT, WIN32, or WINDOWS.

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