Files
mgmt/examples/lang/structlookup1.mcl
James Shubin 6cc5adcd25 lang, test, examples: lang: Use new syntax for structlookup
Sugar makes the world go round.
2023-11-04 14:52:19 -04:00

16 lines
220 B
Plaintext

import "fmt"
$st = struct{f1 => 42, f2 => true, f3 => 3.14,}
$f1 = $st->f1
print "print1" {
msg => fmt.printf("f1 field is: %d", $f1),
}
$f2 = $st->f2
print "print2" {
msg => fmt.printf("f2 field is: %t", $f2),
}