Loading openscad/libs/libdict.scad +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ function key_lookup(key, dict, default=undef) = // key is in [] because otherwise openscad will search for each letter rather than the string. index = search([key], dict, 1, 0)[0] // There must be a key match or a default value ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found!") ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found and no default given!") // return value from the dict if key matches, else return a default value. index!=[] ? dict[index][1] : default; Loading Loading
openscad/libs/libdict.scad +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ function key_lookup(key, dict, default=undef) = // key is in [] because otherwise openscad will search for each letter rather than the string. index = search([key], dict, 1, 0)[0] // There must be a key match or a default value ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found!") ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found and no default given!") // return value from the dict if key matches, else return a default value. index!=[] ? dict[index][1] : default; Loading