LOTUSSCRIPT LANGUAGE


IsDefined function
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


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.
ConstantPlatform or functionality
WIN16Windows with 16-bit API (Windows 3.1)
WIN32Windows with 32-bit API (Windows NT or WindowsR 95)
WINNTWindows NT
WIN95Windows 95
WIN40Windows 95 or Windows NT 4.0
WIN98Windows 98
WIN2KWindows 2000
WINDOWSAny Windows platform type (any of the above WINxx constants)
HPUXHPR/UNIX 9.X or greater
SOLARISSun™/OS 5.0 or greater
UNIXAny UNIX type (HP_UXR or SolarisR)
LINUXLinux
OS2OS/2, version 2.0 or greater
MACMacintosh System 7
OLEOLE-2 is available
MAC68KMacintosh MotorolaR 68000 version (running on either a 68xxx Macintosh or the PowerPC™)
MACPPCMacintosh 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.

See Also