Easy way to out comment

Hey everybody

My name is Anders, I’m from Denmark and I just signed in to these forums.

I have a question (and there is probably a lot more to come;)):
Is there an easy to way to out comment code? it is tedious to use – every time, so i was thinking something like // from c.

Thanks in advance:)

Andy

–[[
your code, and anything you want to comment. Open with --[[, close with ]], like I have here. This is how you do a multi line comment in lua. If you didn’t mean how to do a multiline comment, please specify.
]]

That was fast! And yes that was exactly what i meant, thanks:)

no problem

But is it possible to select a piece of code and just hit a button to make it out comment it?

@Jell afraid not. Are you new to Codea or just the forums?

Actually, if you select a chunk of code and long press on the “” button above the keyboard, another button will show up to comment that chunk

Is this a new feature @JakAttak? I didn’t see it before.

@JakAttack nice job, proved me wrong. This will be very useful :)>-

@Jell Just a note - Codea uses the programming language Lua, if you have any more questions on it you can try searching the Lua documentation (and because it’s Lua, we can’t change the language itself, or make // a comment)

Awesome guys, that will really come in handy! yep I am new to both Codea and Lua, but have been programming for a year and a half now (not games though).

@Jell well welcome to the forums, you can learn about pretty much any aspect of Codea here. There are quite a few active members who have a fair lot of knowledge in Lua and especially Codea, don’t be afraid to ask anything! Just a question, what language were you using before Codea?

@Luatee, it might be new since 2.0, hard to remember. Handy feature I often use.

Fun fact, you can also use --[[]] to nest comments within code lines, without interrupting the code.