                           SharedBLib Style Guide
                           

Documentation


Follow the existing documentation's format. One of the best things a future
maintainer of BLib could do is to add some commented skeleton documentation
pointing out all the salient features. The documentation tries to look nice
by using ligatures  , en and em dashes  , and proper quotes    .


Procedure/Function names


In general it is advised to make procedure/function names start with the
library name (or a shorter version), for example:

PROCwimp_quit     (Wimp library)
PROCtemp_init     (Template library)

This is not a hard and fast rule, but care should be taken when not following
this format (try to pick something that is likely to be unique, PROCf is NOT
acceptable.)


Global and Local variables


All variables must be made LOCAL except for those which are explicitly global
(this includes labels in assembler code which do not need to be made global,
e.g. loop labels).

Global variables should start with an underscore '_' and then be
followed by the library name (or variant) then another '_' then the
variable name. Examples :

_wimp_buffer%    (Wimp library)
_mem_error%      (Memory library)

Again this is not a hard and fast rule, but it should only be broken when
there is a good reason for it (and document it).
