Comment start and end

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
mk-soft
Always Here
Always Here
Posts: 6212
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Comment start and end

Post by mk-soft »

I like this...

Code: Select all

;{ For start comment

;} for end comment
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Comment start and end

Post by Danilo »

mk-soft wrote:I like this...

Code: Select all

;{ For start comment

;} for end comment
Already in common use for folding.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Comment start and end

Post by Tenaja »

Yes, but that folding does not comment-out the code lines between the fold...
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Comment start and end

Post by ts-soft »

Tenaja wrote:Yes, but that folding does not comment-out the code lines between the fold...
but if we do this, we require a new way to folding without comment-out :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Comment start and end

Post by Tenaja »

Right, Thomas... I guess it's a bust! :mrgreen:


In the meantime, a workaround I have used is...

Code: Select all

Compilerif 0
  Many lines of comments without additional ; characters.
  Unfortunately the IDE does not STYLE them as comments.
  And If you use the word If it is capitalized instead of left as "if".
compilerendif
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Comment start and end

Post by Danilo »

Tenaja wrote:Yes, but that folding does not comment-out the code lines between the fold...
I wanted to say: ;{ is already in common use for folding, so if you turn it into multi-line comment now,
our codes are commented out. It is not backward compatible.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Comment start and end

Post by IdeasVacuum »

my work-around :mrgreen:

Code: Select all

 ;Many lines of comments with ; characters.
 ;the IDE does STYLE them as comments.
 ;And if you use the word if it is not capitalized instead of left as "if".
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Comment start and end

Post by Josh »

Tenaja wrote:In the meantime, a workaround I have used is...

Code: Select all

Compilerif 0
  Many lines of comments without additional ; characters.
  Unfortunately the IDE does not STYLE them as comments.
  And If you use the word If it is capitalized instead of left as "if".
compilerendif
You are happy with such a result?
CompilerIf 0
Many lines of comments without additional ; characters.
Unfortunately the IDE does Not STYLE them As comments.
And If you use the word If it is capitalized instead of left As "if".
compilerendif
I like IdeasVacuums work-around :D
sorry for my bad english
Post Reply