Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Blanking out multiple lines of code

(53 views • 6 replies)

This topic is 1 page long.

<< < > >>
Questioning

Petwoip

Reply To Post Reply & Quote

Posted at: 6/27/08 09:42 PM

Petwoip LIGHT LEVEL 04

Sign-Up: 01/18/05

Posts: 219

I know the "//" before a line can negate a line of code, but is there a way to blank out a whole group of code. I hate when I have to write:

//
//
//
//
//
//

For dozens of lines. So what's an easier method?

.

BBS Signature

None

CaptinChu

Reply To Post Reply & Quote

Posted at: 6/27/08 09:44 PM

CaptinChu DARK LEVEL 15

Sign-Up: 09/11/05

Posts: 3,176

/*
This
Is
A
Comment
*/

Multiline comments are between /* and */

All programming problems can be solved with Arrays!

BBS Signature

Elated

Petwoip

Reply To Post Reply & Quote

Posted at: 6/27/08 09:46 PM

Petwoip LIGHT LEVEL 04

Sign-Up: 01/18/05

Posts: 219

Thanks, that will help speed things up!

.

BBS Signature

None

kid-dude

Reply To Post Reply & Quote

Posted at: 6/27/08 09:52 PM

kid-dude DARK LEVEL 06

Sign-Up: 05/12/05

Posts: 508

Damn beat me to it.

So heres some trivia. That is an accepted practice in many modern coding languages. One such being Java.

So there.

szafranko wrote:
im willing to put much credit for somone who can create a dorito's character to my likeing....
Linkage: Cracked | Geekologie | xkcd | smbc

BBS Signature

None

CaptainPoncho

Reply To Post Reply & Quote

Posted at: 6/27/08 09:53 PM

CaptainPoncho EVIL LEVEL 08

Sign-Up: 11/29/03

Posts: 524

At 6/27/08 09:52 PM, kid-dude wrote: Damn beat me to it.

So heres some trivia. That is an accepted practice in many modern coding languages. One such being Java.

So there.

Commenting is an accepted practice? Who'd have thought?


None

JPI

Reply To Post Reply & Quote

Posted at: 6/27/08 10:22 PM

JPI DARK LEVEL 20

Sign-Up: 05/09/05

Posts: 3,111

At 6/27/08 09:52 PM, kid-dude wrote: Damn beat me to it.

So heres some trivia. That is an accepted practice in many modern coding languages. One such being Java.

So there.

Just to whore this out some more.

In the actionscript developing program "Flash Develop", you can comment the line of code you are on by pressing Ctrl+Q.

Also, have you noticed that it's hard to do comment out chunks of code on a laptop because it doesn't have the numberpad (where / is right next to *). Frustrates me everytime :/

SIG YOINK!

BBS Signature

None

Calipe

Reply To Post Reply & Quote

Posted at: 6/27/08 10:46 PM

Calipe NEUTRAL LEVEL 23

Sign-Up: 02/28/04

Posts: 331

I would add my 2 cents here as well.

If you want to comment something within a line but still allow other parts of the SAME line to execute, you can use the multiline comment statement /* */.

Example:

private var particles:Array /* of MovieClips */ = new Array();

Notice that the comment is within the same line directive, this does not interfere with the rest of the code however. So the above line still executes, and ActionScript sees this directive as:

private var particles:Array = new Array();

NipponExports.com - Japanese Goods!

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 05:52 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!