IsStruct
Determine whether a value is a struct
Method Signature
IsStruct(variable=[any])
Arguments
Argument
Type
Required
Description
Default
variable
any
true
The value to test for structi-ness.
Examples
isStruct Example
Returns true if variable is a Boxlang structure or is a Java object that implements the java.lang.Map interface.
isStruct( structNew() );
Result: true
isStruct Example for False
Returns false is the object in the variable parameter is a user-defined function UDF). In the example below exponent is a function created by the user
isStruct( arrayNew( 1 ) );
Result: false
Additional Examples
str = structNew();
writeOutput( isStruct( str ) );
Related
Last updated
Was this helpful?