Skip navigation.
spilling the beans

commenting out portions of code in TI

developers
|

You would like to comment out portions of code for legacy or future use instead of removing it. Appending # at the front of every line is ugly and messes up the indenting. Here is a quick, neat and simple fix...

############# PORTION COMMENTED OUT
if(1 = 0);

#code to comment out is here

endif;
####################################

That's it. It can come also handy to turn off auto-generated code in the #****GENERATED STATEMENTS START****.

/!\ I would strongly recommend you add clear markers around the code commented out otherwise it can be very easy to overlook the short if statement and spend a while wondering why the process is not doing anything.

Thanks Paul Simon for the tip.


Average rating
(1 vote)