Code: Select all
myval := mymap[mykey, my_default_value]
..or..
myval := mymap.Find(mykey, my_default_value)
Currently, there is no simple way to ask the map if it has a value, then get that value, without searching for that value twice.
Code: Select all
myval := mymap[mykey, my_default_value]
..or..
myval := mymap.Find(mykey, my_default_value)
Code: Select all
myval := mymap[mykey], !myval? myval:=my_default_value
Users browsing this forum: No registered users and 30 guests