DNS query: Difference between revisions

m
(Added entry for unix statement/function in FB 7.0.23 and newer)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 2,074:
 
However, if Wren is embedded in (say) a suitable Go program, then we can ask the latter to do it for us.
<syntaxhighlight lang="ecmascriptwren">/* dns_queryDNS_query.wren */
 
class Net {
Line 2,085:
which we embed in the following Go program and run it:
{{libheader|WrenGo}}
<syntaxhighlight lang="go">/* go run dns_queryDNS_query.go */
 
package main
Line 2,108:
func main() {
vm := wren.NewVM()
fileName := "dns_queryDNS_query.wren"
methodMap := wren.MethodMap{"static lookupHost(_)": lookupHost}
classMap := wren.ClassMap{"Net": wren.NewClass(nil, nil, methodMap)}
9,476

edits