-->
Page 1 of 4

Multiline comments seem to fail to be comments

PostPosted: Sat Dec 12, 2015 12:53 pm
by Trickuncle
I've been having a strange time with multiline comments using esplorer to send code to my ESP8266. I commented out a block of code with --[ and --] before and after the code. Testing showed the missing code didn't affect the operation. Until a bit later and then the code failed. I put the code back in and it worked again.

So then I commented out the code line by line with double dash: -- and now the code failed right away. Removing the comment symbols restored it. So although the --[ and --] made the code go green italicized like a comment, it was still getting run.

I don't know if it's something in how esplorer sends the code or if the ESP8266 Lua interpreter mis-handles it.

Re: Multiline comments seem to fail to be comments

PostPosted: Sat Dec 12, 2015 3:59 pm
by xtal
I have used --[[ --]] havn,t had any issues ...
using esplorer v0.2.0-rc2 [ I do get lots of T.O.'s using right side buttons delete/compile lc the following embedded line is causing the issue I think , manual delets etc no prob]
{ r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil}

I'm using SDK 1.4.0 7 modules + adc FLOAT [ I think heap shows total fragmented memory avail ]
I get not enough mem by rearringing if/else/end stuff [simple stuff] and have 20k heap
what SDK are you using......?

Re: Multiline comments seem to fail to be comments

PostPosted: Sat Dec 12, 2015 4:56 pm
by Trickuncle
No sdk - I'm using nodemcu and programming in Lua.

After posting about the comments maybe not working correctly, some other strange things happened like uploading new code but the old code keeps running. Finally, after exit and restart of esplorer and hitting the reset button on the module itself, the new code showed up in the browser. So maybe it was just 'operator' problems.

Re: Multiline comments seem to fail to be comments

PostPosted: Sun Dec 13, 2015 7:14 am
by JeremiahLandi
Trickuncle wrote:So maybe it was just 'operator' problems.


I have had more than a couple of those so far... Good Luck!