[void] is an an object which represents "not present" or "non-existant". This is used primarily for method return values. For example, [map->find] will return [void] when the object being searched for is not contained within the map. [void] is the default return value for a method which does not explicitly return anything. It is recommended that [void] only be used in method returns and in value comparison. To illustrate, inserting a void into a map would make it difficult to determine whether or not the value exists within the map.
[void] in Lasso has the following attributes.
This example shows how void is used to indicate "not found" when searching a map.
local(mp = map('a'=1, 'b'=2, 'c'=null)) void == #mp->find('c') // yields false. 'c' was contained within the map #mp->find('d') == void // yields true. 'd' was not contained within the map
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft