Anyone know if putting in two User Code blocks with “/" and "/” (sans quotes) will work to comment out the blocks in-between?
I want to comment out large chunks of code including conditions (if, while, etc.) and without having to click on every block.
Edit: Oops!:o I forgot there was a separate EasyC forum. Mods, wanna move this? Sorry.
EDIT: I’m not entirely postive that will work in EasyC, it’s standard C so I think it will. Let me know if it does?
Instead of doing /* and */ do this
int myvar = 0;
#if 0 // Will never be satisfied
int myvar = 0;
Pre-processor directives won’t be succeptible to comment blocks in the block you’re trying to comment. Good luck!
Aha - good idea!
I would have thought of that.
Is there no way then to comment out (or otherwise render irrelevant) one “elseif” from the middle of a string of them?
A very easy way to comment out blocks is to simply right click them, then hit “comment out block”. From my experience, this does not work with entire, long statements such as an if, else, for etc., but it will work with individual blocks and user functions.
Thanks - I’d gotten that part, but as you noted, it doesn’t work on conditions, and you can’t comment out multiple blocks in one fell swoop.
I just realized I put this in the wrong forum - sorry, mods.
Could the EasyC forum (and its subforums, natch) be itself made a subforum of the programming forum. That would seem to make more sense; I know I would have found it that way.
/ and /
works very well in the User Code Block