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!")
P#43081 2017-08-05 09:39 ( Edited 2017-08-05 14:34)

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

P#43082 2017-08-05 10:20 ( Edited 2017-08-05 14:20)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 22:53:49 | 0.005s | Q:14