add variable prefix
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri Aug 25 09:59:09 2006 +0200 (2006-08-25)
changeset 64a89c25520f1
parent 5 df268610ad73
child 7 e53ac3c458e9
add variable prefix
doc/codingstd.tex
     1.1 --- a/doc/codingstd.tex	Fri Aug 25 09:52:48 2006 +0200
     1.2 +++ b/doc/codingstd.tex	Fri Aug 25 09:59:09 2006 +0200
     1.3 @@ -229,6 +229,20 @@
     1.4  {\tt int sum1;}\\
     1.5  {\tt int loopCount10;}
     1.6  
     1.7 +\item {\bf Class Member and Global Variables}. To be able to distinguish 
     1.8 +local variables from class member and global variables, prepend the
     1.9 +\code{m\_} prefix to class member variables and the \code{g\_} prefix
    1.10 +to global variables.
    1.11 +
    1.12 +Examples:
    1.13 +\begin{verbatim}
    1.14 +class Foo {
    1.15 +private:
    1.16 +    int m_myPrivateVar;
    1.17 +};
    1.18 +static int g_myGlobalVar;
    1.19 +\end{verbatim}
    1.20 +
    1.21  \item {\bf Subroutine Names}.  All subroutine names, including global
    1.22  routines and member functions in classes, will start with an upper case
    1.23  letter, and consist of only alphabetic characters and numeric digits