QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: xra7en on January 19, 2019, 09:41:59 am

Title: comment blocks (wish list?)
Post by: xra7en on January 19, 2019, 09:41:59 am
Now that is interesting, to this day, even in BATCH file - which I write a lot as well, I never use REM. It feels klunky and messy.
Now with that said (and since the topic is brought up), how hard would it be to add block comments

Code: QB64: [Select]
  1. /*
  2.  * this is  a block
  3.  *
  4.  */
  5.  
or

Code: QB64: [Select]
  1. /*
  2.  
  3. this is a block too
  4.  */

is it possible to do with  " ' "?

maybe
Code: QB64: [Select]
  1. '*
  2. block of comments
  3. *'
  4.  

sometimes I want to write a lot of comments and each line of ', gets redundant

If it already exists, please correct and show me the way !!
Title: Re: comment blocks (wish list?)
Post by: SMcNeill on January 19, 2019, 10:20:38 am
One simple way is to use the precompiler to make a segment comments.

$IF BLOCKCOMMENT THEN
  Comment
  Comment
  Comment
$END IF
Title: Re: comment blocks (wish list?)
Post by: Pete on January 19, 2019, 11:38:18 am
Well that's both clever and handy.

It can work with something as short as this, too...

$IF ' THEN
    sdfsfsdf
    sfdsfsfsf
    sdfsdfsdf
    sfsdfsdf
$END IF
Title: Re: comment blocks (wish list?)
Post by: xra7en on January 19, 2019, 11:49:04 am
well hell, that's pretty slick - not pretty, but slick