Click or drag to resize

EmptyUsual Function

Return the empty value of a specified data type.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION EmptyUsual(
	kType AS DWORD
) AS USUAL
View Source

Parameters

kType
Type: UInt32
The data type whose empty value is desired.  The constants defining all X# data types are listed in the table below.

Return Value

Type: Usual
The empty value of the data type specified by <kType>.  These values are as follows: <kType> Empty Value ARRAY NULL_ARRAY or empty array BYTE, DWORD 0 FLOAT, INT 0 LONGINT, REAL4 0 REAL8, SHORTINT 0 WORD 0 CODEBLOCK NULL_CODEBLOCK DATE NULL_DATE LOGIC FALSE OBJECT NULL_OBJECT PSZ NULL_PSZ PTR NULL_PTR STRING Spaces, tabs, carriage return/line feed, or NULL_STRING SYMBOL NULL_SYMBOL USUAL NIL VOID NIL
Remarks
Examples
This example shows the result of EmptyUsual() for different data types:
X#
? EmptyUsual(LOGIC)                                // FALSE
? EmptyUsual(SHORTINT)                // 0
? EmptyUsual(STRING)                        // NULL_STRING
This example passes the result of the EmptyUsual() function to the Empty() function:
X#
? Empty(EmptyUsual(DATE))                        // TRUE
? Empty(EmptyUsual(LONGINT))        // TRUE
? Empty(EmptyUsual(SYMBOL))          // TRUE
See Also