[map->find] returns the value for the key that matches the parameter. Accepts a single parameter of any data type.
If no keys in the map match the parameter to the [map->find] method then Null is returned.
Note: beginning with Lasso™9, the [map-get] method is equivalent to this method.
map->find( key )
Use the [map->find] method. The following example retrieves the value for the key 'blue' from a map of colour names to HTML color codes.
Code
var (colours = map( 'red'='#ff0000',
'green' = '#00ff00',
'blue' = '#0000ff',
'grey' = '#aaaaaa') )
$colours->find('blue')
Result
#0000ff
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
Recent Comments