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.

Run Example

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

Run Example

isStruct( arrayNew( 1 ) );

Result: false

Additional Examples

Run Example

str = structNew();
writeOutput( isStruct( str ) );

Last updated

Was this helpful?