MAC vendor lookup: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→{{header|Wren}}: Minor tidy) |
|||
Line 1,600:
However, if Wren is embedded in (say) a suitable Go program, then we can ask the latter to do it for us.
<syntaxhighlight lang="
class MAC {
foreign static lookup(address)
Line 1,611:
which we embed in the following Go program and run it.
{{libheader|WrenGo}}
<syntaxhighlight lang="go">/*
package main
Line 1,641:
func main() {
vm := wren.NewVM()
fileName := "
methodMap := wren.MethodMap{"static lookup(_)": macLookup}
classMap := wren.ClassMap{"MAC": wren.NewClass(nil, nil, methodMap)}
|