Author Topic: Remarks ( ' comment ) doesn't stay on it's collumn  (Read 2557 times)

mezzoforte

  • Newbie
  • *
  • Posts: 5
Remarks ( ' comment ) doesn't stay on it's collumn
« on: March 04, 2007, 07:18:14 AM »
I'm used to add comments to my source code (who wouldn't) but I prefer to align the comments at collumn 80. This will split my source into to 2 blocks, the left block in pure code and the right block having the comments. Whenever i try to allign comments at collumn 80, the whole remark is then moved to the end of the statement plus 1 char. Is there a way to turn that behaviour off?

Linux Basic

Remarks ( ' comment ) doesn't stay on it's collumn
« on: March 04, 2007, 07:18:14 AM »

timothy

  • Sr. Member
  • ****
  • Posts: 319
Re: Remarks ( ' comment ) doesn't stay on it's collumn
« Reply #1 on: March 04, 2007, 12:38:13 PM »

So you would like your comments to start in column 80? Sounds like you started programming career using COBOL. This was a language who's format was determined by the layout on punched cards. Ah! good old COBOL. This was the language I first learned seriously. And despite all it's oddities I still have a soft spot for it.

Sorry but Gambas 2 reformats the line for you. I do not think you can turn it off. So you are going to spend all your time editing comments if you keep trying to line them up at column 80. Gambas version 1 reformatting of a line is less intense, but you are still going to have problems.

By the way in Gambas 2 you can experiment with the Gambas code editor
  • Create a new project
  • Make sure the gb.qt.ext component in your project
  • Add a Editor control to your form
  • Set the Highlight property to Gambas
Run the project and then play with the options. This is the same editor that is used in the Gambas 2 IDE.
42 - So long and thanks for all the fish.

mezzoforte

  • Newbie
  • *
  • Posts: 5
Re: Remarks ( ' comment ) doesn't stay on it's collumn
« Reply #2 on: March 04, 2007, 05:44:00 PM »
Yah ;-) Ever punched a hole wrongly? - yeez, debugging the puchcards... The good old time! (mostly at nightly hours) ;-)

The commenting habbit is something from the old days. Yes. Still it reads perfectly...

I've noticed the component and off course I will play with it, however, recoding the internal parser is a different cookie so to speak.

I'll learn to live with it.....

thx