Files
mgmt/examples/lang/maplookup1.mcl
2023-10-17 15:32:13 -04:00

16 lines
244 B
Plaintext

import "fmt"
$m = {"k1" => 42, "k2" => 13,}
$found = $m["k1"] || 99
print "print1" {
msg => fmt.printf("found value of: %d", $found),
}
$notfound = $m["k3"] || 99
print "print2" {
msg => fmt.printf("notfound value of: %d", $notfound),
}