Author Topic: comment blocks (wish list?)  (Read 3094 times)

0 Members and 1 Guest are viewing this topic.

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
comment blocks (wish list?)
« 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 !!
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: comment blocks (wish list?)
« Reply #1 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
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Marked as best answer by xra7en on January 20, 2019, 06:28:03 pm

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: comment blocks (wish list?)
« Reply #2 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
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: comment blocks (wish list?)
« Reply #3 on: January 19, 2019, 11:49:04 am »
well hell, that's pretty slick - not pretty, but slick


I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!