Block comment

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
eevee
User
User
Posts: 69
Joined: Sat Jan 08, 2005 6:24 pm
Location: UK

Block comment

Post by eevee »

In PureBasic.exe, highlighting a series of consecutive lines and pressing a character will replace the highlighted line with the single character pressed.

However if the character entered is a TAB the whole block is simply tabbed rather than replaced. Similarly pressing SHIFT-TAB tabs back removing the white spaces at the front of the lines.

It would be nice if a similar mechanism to the TAB one existed for quickly commenting out a block of lines. In other words pressing ; would insert the commenting semi-colon in front of all highlighted lines.
Regards,

Ernest
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

japbe anyone? :-)
( 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... )
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

What's wrong with Ctrl-B and Alt-B?
<°)))o><²³
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

dunno :-)

nothing i guess :-)
( 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... )
eevee
User
User
Posts: 69
Joined: Sat Jan 08, 2005 6:24 pm
Location: UK

Post by eevee »

I'm really not winning with PureBasic at the moment! :oops:

But ........

where on earth are the instructions for this flipping program?

The command list is great but that is what it is - a listing of functions.

Short of ploughing through other people's (such as yours Blueznl) documents there does not seem to be a unified resource.

OR am I wrong on this one also? :roll:

Do YOU mention commenting on your docs? :roll:
Regards,

Ernest
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

eevee wrote:Do YOU mention commenting on your docs? :roll:
Don't know, but it's always present in the editor's menu ;)
<°)))o><²³
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

With JaPBe, it is possible to do

Code: Select all

;{
Comments line 1
comment line2
etc...
;}
If we would be able to do that with PureBasicEditor, it would be good.
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
eevee
User
User
Posts: 69
Joined: Sat Jan 08, 2005 6:24 pm
Location: UK

Post by eevee »

So it is .......

I think I am getting too old for this game! :(
Regards,

Ernest
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

There are errores when I doit.
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Gansta93 wrote:With JaPBe, it is possible to do

Code: Select all

;{
Comments line 1
comment line2
etc...
;}
No, this doesn't command the lines! It make the lines foldable.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

japbe

1. [shft] + [cursor down]
2. [ctrl] +

works fine for me...
( 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... )
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

Yes. It works so with PureBasic editor. But it would quickly if we would be able to do something to comment lines like C or C++ (not same "/**/"), but another.
For example,

Code: Select all

;*Comments
Second line of comments
others...*;
it would be good... no restriction in the code, because of the ";" at first, and quick to comment lines without selection and shortcut.
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

oh i see

something like a compiiler directive...

$StartComment .. $EndComment
( 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... )
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

blueznl wrote:oh i see

something like a compiiler directive...

$StartComment .. $EndComment
Your example is more explicit... it'd be good! :-D
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Something like

Code: Select all

compilerif #false
this is ignored
compilerendif
?
Post Reply