IsCodeBlock Function | |
Determine if a value is a code block.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION IsCodeBlock(
uValue AS USUAL
) AS LOGIC
public static bool IsCodeBlock(
Usual uValue
)
Request Example
View SourceParameters
- uValue
- Type: Usual
The value to examine.
Return Value
Type:
Logic
TRUE if the value is a code block; otherwise, FALSE.
Remarks
IsCodeBlock() identifies both runtime and compile-time code blocks as code blocks.
UsualType(), on the other hand, identifies runtime code blocks as objects.
Examples
This example uses IsCodeBlock() and UsualType() on a runtime code block:
1LOCAL cbRunTime
2
3cbRunTime := &("{||TRUE}")
4? UsualType(cbRunTime)
5? IsCodeBlock(cbRunTime)
This example uses IsCodeBlock() and UsualType() on a compile-time code block:
1LOCAL cbCompileTime
2
3cbCompileTime := {||TRUE}
4? UsualType(cbCompileTime)
5? IsCodeBlock(cbCompileTime)
See Also