Page 1 of 2

Code Decoration: The End

Posted: Fri Mar 13, 2009 4:22 pm
by scriptmaster
I use the following to wrap PB codeblocks:

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;{;;;;;;;;;;;;;;               INCLUDES                  ;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

IncludeFile "Common.pb"
IncludeFile "EventProcs.pb"

;};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

And I use the following at the end of my event loops:

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;                               ;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;                                               ;;;;;;;;;;;;;
;;;;;;;;                                                         ;;;;;;;;
;;;;;                                                               ;;;;;
;;;                                                                   ;;;
;;                                                                     ;;
;                                 The                                   ;
                                  End                                    
;                                                                       ;
;;                                                                     ;;
;;;                                                                   ;;;
;;;;;                                                               ;;;;;
;;;;;;;;                                                         ;;;;;;;;
;;;;;;;;;;;;;                                               ;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;                               ;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Love PB!!! :D


Hope this helps! :D

Posted: Fri Mar 13, 2009 4:31 pm
by Kaeru Gaman
a long time ago, in a galaxy far far away, I used fancy stuff like this:

Code: Select all

; #######################################################
;
;    ## ##     ##   ##    ##    ####  ##  ##     ## ## 
;     ###      ### ###   ####    ##   ### ##      ###  
;   #######    #######  ##  ##   ##   ######    #######
;     ###      ## # ##  ######   ##   ## ###      ###  
;    ## ##     ##   ##  ##  ##  ####  ##  ##     ## ## 
; 
; #######################################################
but it is a waste of time id it isn't generated automatically.
nowadays, one or two lines full of asterisks are fully sufficent.

Code: Select all

;*******************************************************
;*** PROCEDURES
;*******************************************************


;*******************************************************
;*** MAIN LOOP
;*******************************************************
PS:
I think is is rather some Offtopic-Talk than some "Tricks 'n' Tips"...

Posted: Fri Mar 13, 2009 4:48 pm
by Rings
Kaeru Gaman wrote:PS:
I think is is rather some Offtopic-Talk than some "Tricks 'n' Tips"...
done

Posted: Fri Mar 13, 2009 7:16 pm
by Tipperton

Code: Select all

;--------------------------------------------------------------------- 
; PROCEDURES
<code>

;--------------------------------------------------------------------- 
; MAIN LOOP
<code>
Works for me...

Posted: Sun Mar 15, 2009 12:22 am
by Franky
Comments? What is a comment? Was hard to right, should be hard to read, too 8)

Posted: Sun Mar 15, 2009 12:28 am
by X0r
but only for code bandits :twisted:

Posted: Sun Mar 15, 2009 7:50 am
by Mistrel
I use comments for comments and use multiple files to organize what groups of functions do what, similar to breaking a project up into classes. I use one file "inc.Prototypes.pb" in "Main.pb" which contains global structures, includes, and prototypes.

Posted: Sun Mar 15, 2009 3:46 pm
by GeoTrail
So that's the reason you guys can spend 2 hours writing an empty if else end block hehehe

Posted: Sun Mar 15, 2009 5:16 pm
by Inner
Try this;

http://search.cpan.org/~jasonk/DBICx-Au ... AutoDoc.pm

About as close as I can find to the good'ol Amiga Includes & Autodocs format.

Posted: Sun Mar 15, 2009 5:18 pm
by Hroudtwolf
Yeah. Is it a new style named "bollywood coding"?

Posted: Sun Mar 15, 2009 5:25 pm
by Kaeru Gaman
no, this is commending, not coding...

"Bollywood Coding" would mean, that the main variables take four minutes to dance and sing before you can erase them...

Posted: Sun Mar 15, 2009 5:40 pm
by Hroudtwolf
I would like it ^^

Posted: Sun Mar 15, 2009 6:57 pm
by Joakim Christiansen
Image
...
Image

This is what I love about the PureBasic IDE... :D No more mess!

Posted: Sun Mar 15, 2009 8:42 pm
by Kaeru Gaman
oh... looks cool.
you added ;- as foldstard and ;_ as foldend, to achieve this?
nice idea!

Posted: Sun Mar 15, 2009 11:34 pm
by Joakim Christiansen
Kaeru Gaman wrote:oh... looks cool.
you added ;- as foldstard and ;_ as foldend, to achieve this?
nice idea!
Indeed, this is so I can get it marked in the "tools panel" too. Else I just use the default ;{ and ;} :)