From 645bd6fc8f4356f46478f1795830c926fbd7c3ec Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 25 Aug 2006 09:59:09 +0200 Subject: [PATCH] add variable prefix --- doc/codingstd.tex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/codingstd.tex b/doc/codingstd.tex index 69a9ed922..ac23c0246 100644 --- a/doc/codingstd.tex +++ b/doc/codingstd.tex @@ -229,6 +229,20 @@ Examples: {\tt int sum1;}\\ {\tt int loopCount10;} +\item {\bf Class Member and Global Variables}. To be able to distinguish +local variables from class member and global variables, prepend the +\code{m\_} prefix to class member variables and the \code{g\_} prefix +to global variables. + +Examples: +\begin{verbatim} +class Foo { +private: + int m_myPrivateVar; +}; +static int g_myGlobalVar; +\end{verbatim} + \item {\bf Subroutine Names}. All subroutine names, including global routines and member functions in classes, will start with an upper case letter, and consist of only alphabetic characters and numeric digits