Comment blocks

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Comment blocks

Post by Dare2 »

Comment blocks, along the lines of /* .. */, would be nice.

Useful for blocking out, restoring chunks of code as well as documenting code.
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

you can use CompilerIf and CompilerEndIf, for example, the following code will be ignored by PB

Code: Select all

CompilerIf 0
;
; ------------------------------------------------------------
;
;   PureBasic - Date example file
;
;    (c) 2002 - Fantaisie Software
;
; ------------------------------------------------------------
;

Date$ = FormatDate("%yyyy/%mm/%dd", Date())
Time$ = FormatDate("%hh:%ii:%ss", Date())

MessageRequester("PureBasic - Date Example", "Date: "+Date$+Chr(10)+"Time: "+Time$, 0)
CompilerEndIf
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Or select a load of text in the IDE then hit Ctrl-B :)
--Kale

Image
Post Reply