|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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! I forgot there was a separate EasyC forum. Mods, wanna move this? Sorry.Last edited by P1h3r1e3d13 : 20-02-2006 at 19:25. Reason: See post |
|
#2
|
||||
|
||||
|
Re: Commenting out in EasyC?
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 Old way: Code:
/* int myvar = 0; Default(); Code(); DoStuff(); */ Code:
#if 0 // Will never be satisfied int myvar = 0; Default(); Code(); DoStuff(); #endif Last edited by Matt Krass : 20-02-2006 at 02:55. Reason: Second thought |
|
#3
|
||||
|
||||
|
Re: Commenting out in EasyC?
Aha - good idea!
if (0) { I would have thought of that. } Thanks edit: Is there no way then to comment out (or otherwise render irrelevant) one "elseif" from the middle of a string of them? Last edited by P1h3r1e3d13 : 20-02-2006 at 15:46. Reason: New question |
|
#4
|
||||
|
||||
|
Re: Commenting out in EasyC?
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.
|
|
#5
|
||||
|
||||
|
Re: Commenting out in EasyC?
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.
|
|
#6
|
||||
|
||||
|
Oops!
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. Last edited by P1h3r1e3d13 : 20-02-2006 at 19:33. Reason: Added suggestion |
|
#7
|
||||
|
||||
|
Re: Commenting out in EasyC?
*/ and /*
works very well in the User Code Block |
|
#8
|
||||
|
||||
|
Oh good - thanks.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EasyC Wish List | dcbrown | Programming | 32 | 14-08-2006 09:24 |
| EasyC v2.0 is mandatory for FVC! | skimoose | FIRST Tech Challenge | 7 | 14-01-2006 18:37 |
| Kickoff easyC workshop integrated into EasyC help file | Dan Larochelle | Programming | 0 | 11-01-2006 06:12 |
| EasyC v. 2.0 - New features, custom user functions, and more! | artdutra04 | FIRST Tech Challenge | 1 | 02-11-2005 13:36 |