I am reading “Introduction to Lua” (in Corona Basics):
You can comment out a full block of code by surrounding it with –[[ and ]]. To uncomment the same block, simply add another hyphen to the first enclosure, as in —[[.
Try to do that, I mean uncomment by adding an extra hyphen, and you’ll get something like
unexpected symbol near ']'
This is because you’ll have a couple of rogue square brackets in your code, those closing the multiline comment:
---[[entire block commented out print( 10 ) print( 15 )]] -- \< problem
This is in fact an erroneous attempt to follow an advice given by Roberto Ierusalimschy in his “Programming in Lua”. The original advice goes like so:
A common trick to comment out a piece of code is to enclose the code between --[[and --]], like here:
–[[
print(10) – no action (commented out)
–]]
To reactivate the code, we add a single hyphen to the first line:
When you open this page (or any other page) from the Corona University, it opens in a sort of modal popover which is quite a pain to manipulate on an iPad. Unfortunately, this kind of web UI is quite fashionable these days.
When you open this page (or any other page) from the Corona University, it opens in a sort of modal popover which is quite a pain to manipulate on an iPad. Unfortunately, this kind of web UI is quite fashionable these days.