User talk:SoulStealer9875/Programming With Lua: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>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 ...
 
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
(2 intermediate revisions by 2 users not shown)
Line 10: Line 10:
which then prints "a"
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 <code>\n</code>
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 <code>\n</syntaxhighlight>
{{User:NXTBoy/sig|date=11:19, 11 September 2011 (UTC)}}
{{User:NXTBoy/sig|date=11:19, 11 September 2011 (UTC)}}
: Yes, I suppose so. <br/>(<font face="Hobo Std">[[User:SoulStealer9875|SoulStealer9875]]|[http://www.roblox.com/User.aspx?ID=3827581 ROBLOX-Profile]]</font><div style="border-top: 1px solid #AAA; color:#000000; font-size:10px" align="right">@ 14:57, 13 September 2011 (UTC)</div>

Latest revision as of 06:04, 27 April 2023

"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</syntaxhighlight>

11:19, 11 September 2011 (UTC)
Yes, I suppose so.
(SoulStealer9875|ROBLOX-Profile]
@ 14:57, 13 September 2011 (UTC)