Skip to content

Commit

Permalink
put println back again
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 25, 2025
1 parent c433aa0 commit c381601
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gnovm/pkg/gnolang/uverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,27 @@ func makeUverseNode() {
m.Output.Write([]byte(rs))
},
)
defNative("println",
Flds( // param
"xs", Vrd(AnyT()), // args[0]
),
nil, // results
func(m *Machine) {
arg0 := m.LastBlock().GetParams1()
xv := arg0
xvl := xv.TV.GetLength()
ss := make([]string, xvl)
for i := 0; i < xvl; i++ {
ev := xv.TV.GetPointerAtIndexInt(m.Store, i).Deref()
ss[i] = ev.Sprint(m)
}
rs := strings.Join(ss, " ") + "\n"
if debug {
println("DEBUG/stdout: " + rs)
}
m.Output.Write([]byte(rs))
},
)
defNative("recover",
nil, // params
Flds( // results
Expand Down

0 comments on commit c381601

Please sign in to comment.