Lasso Soft Inc. > Home

[Null->IsA]

Requires a type name as a parameter. Returns True if the base object is of that type or has that type as a parent type.

Note that Null is the base type for all objects in Lasso. Using [Null->Isa: 'Null'] will always return true. To check whether a value does not have a value it is better to use the === operator. [If: $value === Null] ... [/If].

  • Syntax
  • Parameters
[Null->(IsA: 'Type Name']
Required Parameters
Base Object The object to be examined.
Type Name The type to check.
Examples

To check the type of an object:

Use the [Null->IsA] tag. The following example checks a variable to see whether it is a string before performing a string operation on it.

[Variable: 'myString' = 'red,green,blue']
[If: $myString->(IsA: 'string')]
  [Variable: 'myArray' = $myString->(Split: ',')]
[Else]
  [Variable: 'myArray' = (Array)]
[/If]
[Output: $myArray]
Result:
(Array: (Red), (Green), (Blue))
Tag Link [Null->IsA] Category Technical
Type Member Data Source Any
Support Preferred Version 6.0
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft