Closed conejoninja closed 2 years ago
Output is only written when you print a newline (or use println
).
I think it would be a good idea to fix that, the relevant function is here:
The new/refactored playground doesn't have this issue anymore. Now it's a limitation of the TinyGo runtime for WebAssembly:
func putchar(c byte) {
putcharBuffer[putcharPosition] = c
putcharPosition++
if c == '\n' || putcharPosition >= putcharBufferSize {
putcharIOVec.bufLen = putcharPosition
fd_write(stdout, &putcharIOVec, 1, &putcharNWritten)
putcharPosition = 0
}
}
Closing because I don't think there is anything to fix in the playground.
This doesn't show up in the console
This does
This works
This "too"