1,201
edits
m (Text replacement - "</code>" to "</SyntaxHighlight>") |
m (Text replacement - "<SyntaxHighlight code="lua">" to "<syntaxhighlight lang="lua">") |
||
Line 5: | Line 5: | ||
{{Example| | {{Example| | ||
Without (most) whitespace: | Without (most) whitespace: | ||
< | <syntaxhighlight lang="lua"> | ||
number=476 | number=476 | ||
disgusting_food="fried chicken" | disgusting_food="fried chicken" | ||
Line 11: | Line 11: | ||
With whitespace: | With whitespace: | ||
< | <syntaxhighlight lang="lua"> | ||
number = 476 | number = 476 | ||
disgusting_food = "fried chicken" | disgusting_food = "fried chicken" | ||
Line 19: | Line 19: | ||
=== Tabs === | === Tabs === | ||
Tabs are used to organize scripts after: | Tabs are used to organize scripts after: | ||
< | <syntaxhighlight lang="lua">do | ||
then | then | ||
repeat</SyntaxHighlight> | repeat</SyntaxHighlight> | ||
{{Example| | {{Example| | ||
Without tabs: | Without tabs: | ||
< | <syntaxhighlight lang="lua">if 1 == 1 then | ||
while true do | while true do | ||
print("One is equal to one!") | print("One is equal to one!") | ||
Line 35: | Line 35: | ||
With tabs: | With tabs: | ||
< | <syntaxhighlight lang="lua">if 1 == 1 then | ||
while true do | while true do | ||
print("One is equal to one!") | print("One is equal to one!") | ||
Line 50: | Line 50: | ||
{{Example| | {{Example| | ||
Without newlines: | Without newlines: | ||
< | <syntaxhighlight lang="lua"> | ||
print("test") --> test | print("test") --> test | ||
</SyntaxHighlight> | </SyntaxHighlight> | ||
With newlines: | With newlines: | ||
< | <syntaxhighlight lang="lua"> | ||
print( | print( | ||
"test" | "test" | ||
Line 66: | Line 66: | ||
If you put extra whitespace in a string, the whitespace won't be ignored. | If you put extra whitespace in a string, the whitespace won't be ignored. | ||
{{Example| | {{Example| | ||
< | <syntaxhighlight lang="lua">print("Hello world!") --> Hello world! | ||
print("Hello world!") --> "Hello world!" | print("Hello world!") --> "Hello world!" | ||