PDA

View Full Version : block comment?



eoasap
- 12th October 2005, 02:53
is there a way to block comment in picbasic? i've searched the manual and the forum to no avail.

eoasap
- 12th October 2005, 15:49
by block comment, i mean comment out an entire section of code without commenting each line. (although i'm sure everyone here knows that ;) ).
i think i remember C language being something like this.

/* 'starts commenting everything beneath here

line 1
line 2
line 3
...
line n

*/ 'ends block comment

mister_e
- 12th October 2005, 17:21
it could be interesting to have this kind of feature.. but for now, the only way you can do it is to use the Comment Block button in the MicroCode studio located at the right side of the toolbar

Dwayne
- 12th October 2005, 18:42
Hello Eoasap,

Well, I am not sure if this is going to help, but....

the Apostraphie? Anything after the Apostraphie is considered a comment. Thus place a Apostraphie at the beginning of the lines of code you want to block out.

junk var byte

for a = 1 to 10

Junk=junk*10
' junk=junk /10 this has a apostrophie at the beginning.
' ..... So does this line and the next 2 lines.
' ..... Thus, 4 lines of code will be ignored.
' .....
next a



Dwayne

eoasap
- 13th October 2005, 00:31
it could be interesting to have this kind of feature.. but for now, the only way you can do it is to use the Comment Block button in the MicroCode studio located at the right side of the toolbar

lol! i feel pretty stupid for never seeing that. that'll do the trick. thanks alot ;)

eoasap
- 13th October 2005, 00:32
Thanks Dwayne,

I've gotten that far, but i was just struggling with trying to comment out
sections of code (such as a feature that might be causing problems). I hadn't seen the block comment feature in microcode studio, but that does the trick well ;)

Glenn