is_struct

This function checks if the supplied value is a struct. It returns true if it is, otherwise it returns false.

Note that method variables will also return true, and object instances will return false.

 

Syntax:

is_struct(val);

Argument Type Description
val Any The value to check.

 

Returns:

Boolean

 

Example:

if is_struct(a)
{
    delete(a);
}

The above code checks a variable to see if it is a struct, and if the function returns true, the struct is deleted.