Commenting out block of codes

Blitz3D Forums/Blitz3D Beginners Area/Commenting out block of codes

kiami(Posted 2006) [#1]
Is any way to comment out block of codes in Blitz3D? Like /* .. */ or rem .. end rem.


H&K(Posted 2006) [#2]
post deleted


kiami(Posted 2006) [#3]
You mean there was such thing but removed from Blitz3D compiler?


(tu) sinu(Posted 2006) [#4]
i put blocks into a rem if check eg

if rem
code stuff
here
and here
and here
endif

simple :)


Amanda Dearheart(Posted 2006) [#5]
I believe the semicolon (;) is the closest thing you can get to blocking out code.


jhocking(Posted 2006) [#6]
I use goto with the label 'skip'


Boiled Sweets(Posted 2006) [#7]
Or use Visual Blitz, highlight your code block and select comment (or uncomment).

Boy, I wish Eddie hadn't been abducted by aliens :-)


kiami(Posted 2006) [#8]
Thank you all.


H&K(Posted 2006) [#9]
Doesnt Protean have its own Rem statement syntax?


b32(Posted 2006) [#10]
If you want to keep using the B3D editor, just select everything and press CTRL+K, CTRL+I. It will indent the entire code. This makes placing/removing the ";"s at the beginning of the lines more easy.


GitTech(Posted 2006) [#11]

If you want to keep using the B3D editor, just select everything and press CTRL+K, CTRL+I. It will indent the entire code.



Or select everything and press <TAB> to indent, and <SHIFT>+<TAB> to unindent.


b32(Posted 2006) [#12]
lol.. never figured that out .. :) thanks


DH(Posted 2006) [#13]
I believe the semicolon (;) is the closest thing you can get to blocking out code.


Correct as the compiler will ignore this and not put it in. Whereas simply using an if rem or a label, the compiler will still compile it and include the instructions in the final exe (thus taking up space in the exe).


Beaker(Posted 2006) [#14]
Whereas simply using an if rem or a label, the compiler will still compile it and include the instructions in the final exe (thus taking up space in the exe).


Last I remember this isn't true.

Mark once said that using something like this:
If 0
;..some code
Endif

..wouldn't get compiled.


Bobysait(Posted 2006) [#15]

Or select everything and press <TAB> to indent, and <SHIFT>+<TAB> to unindent.



take care with this !
=> ... difficult to explain, but sometimes when code is selected, if you hit Tab, you 'll delete the code instead of indent it. And generally, you can't go back. So Really take care with this methode !


GitTech(Posted 2006) [#16]

take care with this !
=> ... difficult to explain, but sometimes when code is selected, if you hit Tab, you 'll delete the code instead of indent it. And generally, you can't go back. So Really take care with this methode !



Never had any problems with it :-). Just make sure that you don't accidentally hit <Q> or <`> :-)