Go: make use of multiple return values

This commit is contained in:
2018-10-10 20:59:35 +02:00
parent 2717cd569b
commit 2fe3c4753f
3 changed files with 136 additions and 168 deletions

View File

@@ -53,9 +53,7 @@ func main() {
for i := 2; i < len(os.Args); i++ {
args = append(args, *ell.NewString(os.Args[i]))
}
var result []ell.V
if !L.EvalBlock(program, args, &result) {
if _, ok := L.EvalBlock(program, args); !ok {
fmt.Printf("%s: %s\n", "runtime error", L.Error)
}
}