Log In  


In Lua, long comments using --[[ / ]] cannot be nested: another opening --[[ in there will just be ignored. So the following code will print 2 in Lua, and 1 in PICO-8:

a=1 --[[ [[]]
a=2 --]]
print(a)

This is actually a funny way to detect whether you’re running inside PICO-8 :-)

print("running in ".. --[[[[]]
"lua!") --]] "pico-8!")
2


Thats interesting. I didn't realize pico8 supported long comments at all.



[Please log in to post a comment]