Author Topic: Word Wrap in QB64 IDE?  (Read 6429 times)

0 Members and 1 Guest are viewing this topic.

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Word Wrap in QB64 IDE?
« on: April 17, 2021, 08:08:12 pm »
Are there settings for that?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #1 on: April 17, 2021, 08:43:37 pm »
Code lines don't use word wrap but you can use a _ to continue a line below the current line.
Code: QB64: [Select]
  1. S$ = "This is a really really really really really really really really really really really really really really really really" +_
  2.    " sigh, really really really really really really really really long line."
  3.  
  4.  
« Last Edit: April 17, 2021, 08:47:13 pm by bplus »

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #2 on: April 17, 2021, 08:47:58 pm »
I can see that for code lines but what about comments?

say some code requires extensive commenting to explain it's function. It would be nice to have word wrap for comments

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #3 on: April 17, 2021, 08:58:41 pm »
I can see that for code lines but what about comments?

say some code requires extensive commenting to explain it's function. It would be nice to have word wrap for comments

Well put it on your wish list for IDE :) I have built in spellchecker on mine ;-))

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Word Wrap in QB64 IDE?
« Reply #4 on: April 18, 2021, 09:51:05 am »
I can see that for code lines but what about comments?

say some code requires extensive commenting to explain it's function. It would be nice to have word wrap for comments

Just use an $IF block.

$IF COMMENT THEN
   Hi, my name is Steve.
   This is my example.
   It works just like a comment and is excluded from my code,
   Because of the undefined $IF block.
$END IF
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #5 on: April 18, 2021, 12:21:09 pm »
Just use an $IF block.

$IF COMMENT THEN
   Hi, my name is Steve.
   This is my example.
   It works just like a comment and is excluded from my code,
   Because of the undefined $IF block.
$END IF

That's nice but tell me that will word wrap?
« Last Edit: April 18, 2021, 12:29:44 pm by bplus »

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #6 on: April 18, 2021, 12:42:59 pm »
I don't see the need for word wrap here, even on extensive commenting. It just seems to be another person who's simply to lazy to press Enter and a new leading apostroph in the next line. Gosh, how lazy people can be?
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Word Wrap in QB64 IDE?
« Reply #7 on: April 18, 2021, 01:32:43 pm »
I don't see the need for word wrap here, even on extensive commenting. It just seems to be another person who's simply to lazy to press Enter and a new leading apostrophe in the next line. Gosh, how lazy people can be?

I didn't want to be the one to say it but I'm glad someone did. It's just laziness to not be able to press two extra keystrokes.
Shuwatch!

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #8 on: April 18, 2021, 04:16:44 pm »
I didn't want to be the one to say it but I'm glad someone did.

:)

+1. My other thought was, what would this word wrapped comment look like, in a simple text file? To me, the feature would not be useful unless it put a return every so many characters, and then added a ' or a Rem in front of every new line. So that I could cut and paste my programs, as I do all the time, to incorporate them in documents easily.

Others would have different preferences. Seems like a lot of bother, for something that's flexible enough as is?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Word Wrap in QB64 IDE?
« Reply #9 on: April 18, 2021, 09:32:25 pm »
That's nice but tell me that will word wrap?

It doesn’t do it automatically, but just hit ENTER when you’re at the end of a line and then keep typing until the next one.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #10 on: April 18, 2021, 10:18:09 pm »

Quote
Gosh, how lazy people can be?



Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #11 on: April 19, 2021, 12:18:17 pm »
Hey if it weren't for lazy people computers, calculators, the wheel would never have been invented.

[back in the dark ages]
You lazy wuss, what do you mean is there an easier way to get this load of hay into town than by carrying it? ;-))


It's not just a couple of keystrokes if you try to maintain good code notes while writing up and modifying your code as you go. Probably best to do in WP on the side if you feel it just important to log the learning process as having good code. But soon enough you will be dragging the rest of the code in with it, just to show WTH you are talking about. LOL
« Last Edit: April 19, 2021, 01:16:57 pm by bplus »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #12 on: April 19, 2021, 01:07:29 pm »
I guess here is where we insert the new QB64 command... _BLOCKCOMMENT  Come on folks, you know you want it... ;)

On a more serious note, I generally have a
SUB Comments
    'stuff
    'stuff
END SUB
which gets nothing but comments for general program info and isn't called in the code, but yeah, I still have to ' each line in it. Or you can type whatever you like, highlight it & ctrl-R

I think there are plenty options and I use copious comments in my bigger projects. I couldn't remember how anything works otherwise.

If there's one thing I would love to see, it would be a way to collapse SUB/FUNCTION blocks that one is finished working with. I presume that would be challenging to implement or it would have been done by now.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Word Wrap in QB64 IDE?
« Reply #13 on: April 19, 2021, 01:21:18 pm »
Quote
If there's one thing I would love to see, it would be a way to collapse SUB/FUNCTION blocks that one is finished working with. I presume that would be challenging to implement or it would have been done by now.

Well I have a suggestion for that, build a custom library for the app and who knows if it might not be helpful for others or serve as a starter with code already tested? When you have one worked out move it into library.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Word Wrap in QB64 IDE?
« Reply #14 on: April 19, 2021, 02:31:20 pm »
Quote
It's not just a couple of keystrokes

←┘
'
Shuwatch!