I have no problem with the block comments with the semicolon at the very beginning of the line. However, it's not constant positioning. Removing the commented line or lines don't bring back the original positioning / format. Moving, relocation of these lines also gets messy.
I think this block comments stuff should be consistent regardless, and currently it's not.
Please ignore comments for indentation
Re: Please ignore comments for indentation
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Re: Please ignore comments for indentation
I actually like the current way comments are implemented, so I vote for no change! Oh. Can't vote... oh well.
If you're desperately in need of block comments, I'd suggest one of two options:
1. StartComment and EndComment and everything in between is ignored... (A bit how my wife sees me, as I seem to be living within a StartComment / EndComment structure, alas
)
or
2. The double semi colon, aka ';;'
If you're desperately in need of block comments, I'd suggest one of two options:
1. StartComment and EndComment and everything in between is ignored... (A bit how my wife sees me, as I seem to be living within a StartComment / EndComment structure, alas

or
2. The double semi colon, aka ';;'
Code: Select all
for a = 1 to 10
for n = 1 to 10
;
; regular comment
;
;;
;; unadjusted comment
;;
;
next n
next a
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: Please ignore comments for indentation
FYI: I just implemented this way for the next release (minus the prefs option). Your original example now aligns nicely even after a reformat. It works quite well and is not really in the way imho, so I don't think there is need for a configuration option.netmaestro wrote:Here's a start:Code: Select all
If prefs->comment_alignment is true If this line contains a semicolon If the line above this line contains a semicolon Move the comment portion of this line only such that the semicolons are aligned EndIf EndIf EndIf
A second feature that comes with it is the ability to align/shift the comments of a selected code block with Ctrl+Left and Ctrl+Right

quidquid Latine dictum sit altum videtur
Re: Please ignore comments for indentation
Looking forward. 

ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Please ignore comments for indentation
You did it without an additional prefs option, and without an additional special character. That sounds good.freak wrote:FYI: I just implemented this way for the next release (minus the prefs option). Your original example now aligns nicely even after a reformat. It works quite well and is not really in the way imho, so I don't think there is need for a configuration option.

Thanks!
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada