Lua print on the same line

Spread the love

Question Description

In Pascal, I have write and writeln. Apparently Lua’s print is similar to writeln of Pascal. Do we have something similar to write of Pascal? How can consecutive print commands send their output to the same line?

print("Hello")
print("World")

Output:

Hello
world

I want to have this:

Hello world

Practice As Follows

Use io.write instead print, which is meant for simple uses, like debugging, anyway.

Tags

Not what you're looking for? Browse other questions tagged

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.