EmptyUsual Function | |
Return the empty value of a specified data type.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION EmptyUsual(
kType AS DWORD
) AS USUAL
public static Usual EmptyUsual(
uint kType
)
Request Example
View SourceParameters
- kType
- Type: DWord
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:
1? EmptyUsual(LOGIC)
2? EmptyUsual(SHORTINT)
3? EmptyUsual(STRING)
This example passes the result of the EmptyUsual() function to the Empty() function:
1? Empty(EmptyUsual(DATE))
2? Empty(EmptyUsual(LONGINT))
3? Empty(EmptyUsual(SYMBOL))
See Also