Lasso Soft Inc. > Home

[ null ]

Type

 

[Null] has two contexts, one as a type and the other as a value (or more correctly, the unknown value).

All types in Lasso—string, array, map, etc.—can eventually trace down to a null ancestor. If a parent is not explicitly specified when a type is defined then the parent of the type is null.

[Null] itself represents a value that is unknown. [Null] is not zero, not an empty string, and is neither boolean True nor False. When a variable is defined without an initial value assigned to the variable, then the variable will have the default value of null.

  • Syntax
  • Methods
  • Traits
null
Has methods:
Has traits:
Examples
  • Beginner
  • Intermediate

To determine whether an existing local has been initialized with an assigned value:

Compare the local against [Null].

Code

local(n)
#n == null

Result

true

To determine whether a type has further parents:

Compare the type->parent method against 'null' (type->parent returns a string).

Code

set->parent == 'null'

Result

false

Recent Comments

No Comments found

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