Changing Comment ; to // ?

Working on new editor enhancements?
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Changing Comment ; to // ?

Post by Thade »

Hello

I use a patched PB-Editor because of easy to configure autoindent and autocomplete as Editor for a script language.
Works fine besides one thing: After ; there is of course no autocomplete and the color changes etc.

Does someone know how to change comments from ; to // ?

Thanks
RR
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
User avatar
IceSoft
Addict
Addict
Posts: 1695
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Changing Comment ; to // ?

Post by IceSoft »

Why not:
Change

Code: Select all

;
to

Code: Select all

;//
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Re: Changing Comment ; to // ?

Post by Thade »

IceSoft wrote:Why not:
Change

Code: Select all

;
to

Code: Select all

;//
Because that does not work

You know, most script languages use c-style

Code: Select all

for (i=0; i<maxvar; i++)
After the first ; everything is treated as comment !

So the ; as commentsign must be elimenated and while that's done changing it to // would be good, but not necessary ... :wink:
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Changing Comment ; to // ?

Post by blueznl »

IceSoft wrote:Why not:
Pure isn't C. // is ugly as hell. I could live with ' but not with //...
( 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... )
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Changing Comment ; to // ?

Post by Tenaja »

Thade--use Notepad++; it has configurable syntax highlighting.
blueznl wrote:... // is ugly as hell. I could live with ' but not with //...
This is comical, blue! While I would prefer the option to switch comments to // also (or add as an alternative denotation), I understand why Fred does not...but ugly? Calling (a) punctuation mark(s) ugly is ridiculous!

About 80-90% of all code written in this day and age use // as the start of a comment. That is not an exaggeration. All of the top five most popular languages (Normalized Comparison chart, on http://langpop.com/ ) use the double-slash for comments. Many of the top ten use # (perl, ruby, python) or some other "random" character, but PB is stuck in the 80's. I would be shocked if that were not the "reason" for this request.

Because PB uses the apostrophe for characters (i.e. 'a' ), PB cannot use that for comments. Many Basics of old use the semicolon, so this is one of those retro hang-on things we are going to have to deal with...unless Fred chooses to add the backward-compatible option to use // as a second method for commenting. And we all know what kind of changes Fred makes to the compiler, and this is not one of them. I'm so confident he won't that I will promise to buy myself another PB license if he does!
Fred
Administrator
Administrator
Posts: 18225
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Changing Comment ; to // ?

Post by Fred »

May be i can do it only a for a version ? ;)
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Changing Comment ; to // ?

Post by skywalk »

I'll throw in another version for:
block commenting
line continuation
:mrgreen:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Changing Comment ; to // ?

Post by Kwai chang caine »

skywalk wrote:I'll throw in another version for:
block commenting
line continuation
:mrgreen:
Yes yes ....line continuation..line continuation
+100 :mrgreen:
ImageThe happiness is a road...
Not a destination
Post Reply