RCHQ9+/Go: Difference between revisions

Content added Content deleted
(Go solution)
 
m (Update example session for current go tooling. (Remarkably, the source code does not need an update. It was posted in 2011, pre-Go 1.0, and still compiles and runs just fine today with the most recent version of Go.))
Line 72: Line 72:
var a int
var a int
var q = `</lang>
var q = `</lang>
{{out|Example session building and running program}}
(Gosh that made cut and paste easier...cut once, paste twice...)

Anyway, example session:
<pre>
<pre>
$ go build HQ9+.go
$ HQ9+ H+H
$ ./HQ9+ H+H
hello, world
hello, world
hello, world
hello, world
</pre>
</pre>
Another, showing compile link and run of Q output
{{out|Another, running Q output}}
<pre>
<pre>
$ HQ9+ Q >q.go
$ ./HQ9+ Q >q.go
$ 8g q.go
$ go run q.go H
$ 8l q.8
$ 8.out H
hello, world
hello, world
</pre>
</pre>