9632e533bf1e99abde7ce09b9abf57f8c314c8b6 kent Mon Jun 26 08:15:06 2017 -0700 Addressing command line variable (cl prefix rather than g). diff --git src/README src/README index 3b47ea3..328244e 100644 --- src/README +++ src/README @@ -112,30 +112,33 @@ represent "chromosome 22 annotations" as "chromosome22Annotations" or "chr22Ann." Note the capitalized 'A" after the 22. Since both numbers and single letter words (or abbreviations) disrupt the visual flow of the word separation by capitalization, it is better to avoid these except at the end of the name. These naming rules apply to variables, constants, functions, fields, and structures. They generally are used for file names, database tables, database columns, and C macros as well, though there is a bit less consistency there in the existing code base. Variables that are global should begin with the small letter "g." This is a relatively recent convention, and is not so widely used, but when maintaining code or writing new code it would be good to adopt it. +Global variable set from the command line instead should begin with +the letters "cl." This is actually a somewhat older but still not +universal convention. ERROR HANDLING AND MEMORY ALLOCATION Another convention is that errors are reported at a fairly low level, and the programs simply print an error message and abort using errAbort. If you need to catch errors underneath you see the file errAbort.h and install an "abort handler". Memory is generally allocated through "needMem" (which aborts on failure to allocate) and the macros "AllocVar" and "AllocArray". This memory is initially set to zero, and the programs very much depend on this fact.