(SOLVED) "Ignore this" code ~ General Question

Hey guys,

I am writing this code, and I just want to make sure one part of the code works while another part is incomplete. How can I have it so that a segment of the code is ignored in the compiling process?

I know it's possible, I've seen people do it, but I can't remember what they wrote.

Thanks!
Last edited on
You can "comment" lines to make them not used by prepending // or ignore many lines by putting /* at the beginning and */ at the end of what you want ignored. sometimes people will also use #if FALSE and #endif to block out what they don't want. I suppose this is to not cause issues with the /* */ comments
Last edited on
Alright, this can come in handy, especially when dealing with longer codes.
Thank you!
Yeah, sometimes people use #if FALSE etc because of things like this:

1
2
3
4
5
6
7
/*if (stuff) {
   blah
   blah
   /*blah
   blah*/
   blah
}*/


It will stop after the 4th blah, causing problems.
firedraco: It stops ignoring after the fifth line of code? Although the /* and */ is 'ignoring' line 1 to 7?
An */ ending comment block operator doesn't act like a brace. One will cancel out 20 starting /* comment block operators
Last edited on
Topic archived. No new replies allowed.