Closed flintforge closed 6 years ago
Hey @flintforge, where's the difference to the previous one?
First example shows how to toggle individual blocks
#''' < toggling off this # turns the block as a comment (it wasn't, line was mute)
print("you see me")
#'''
second example is the equivalent of C ifdef 0 / ifdef 1 way to comment :
#''' < toggling this # will comment the next block,
print("you saw me now you don't see me")
'''# which will stop here, where it was previously a beginning, hence turning it in an ending block tag
print("you didn't see me, now you do !")
#''' and so, it uncomments the one below
The rule of thumb is :
#
mutes a beginning line, but '''
or """
always remains interpreted as an ending for a beginning comment block, be they preceded by a sharp or not.
The example are easy to understand with syntax coloring, but not without. And so the exercise "comment the code about commenting the code inside the code" can get quite complicated! I updated again the file while writing these explanations.
Hi, there is more ! This applies to turn either one block as comments OR the next one. In the following example, removing the first # will comment block 1 and decomment block 2