User talk:SoulStealer9875/Programming With Lua

From Legacy Roblox Wiki
Revision as of 11:19, 11 September 2011 by >NXTBoy (New page: =="EXPERIMENT TIME!"== You're not explaining at all what's going on. print("a", print("b")) prints "b" then "a" because the inner print statement is executed first. The expression then ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

"EXPERIMENT TIME!"

You're not explaining at all what's going on.

print("a", print("b"))

prints "b" then "a" because the inner print statement is executed first. The expression then becomes

print("a", nil)

which then prints "a"

Either way, doing this is not good practice at all, and only serves to confuse new users. If you want a new line in a print statement, use \n

11:19, 11 September 2011 (UTC)