diff options
author | kate.ward <kate.ward@forestent.com> | 2013-01-14 22:15:26 +0000 |
---|---|---|
committer | kate.ward <kate.ward@forestent.com> | 2013-01-14 22:15:26 +0000 |
commit | 1e1a09839aa4483ab3e8ab3b1b14a154a4d3da15 (patch) | |
tree | 4706898873cdb8a58354ca1439eb57c0f6dab20b | |
parent | c85fa860a0ba979b0dda3c3b4343bb1ec82fd226 (diff) | |
download | shflags-1e1a09839aa4483ab3e8ab3b1b14a154a4d3da15.tar.gz |
updated function and variable naming section
-rw-r--r-- | source/1.0/doc/coding_standards.txt | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/source/1.0/doc/coding_standards.txt b/source/1.0/doc/coding_standards.txt index b2904f5..1a9b52e 100644 --- a/source/1.0/doc/coding_standards.txt +++ b/source/1.0/doc/coding_standards.txt @@ -60,18 +60,25 @@ all variables are technically global variables in some shells. **type** **sample** global public constant ``FLAGS_TRUE`` global private constant ``__FLAGS_SHELL_FLAGS`` -global public variable not used -global private variable ``__flags_someVariable`` +global public variable ``flags_variable`` +global private variable ``__flags_variable`` global macro ``_FLAGS_SOME_MACRO_`` -public function ``assertEquals`` -public function, local variable ``flags_someVariable_`` -private function ``_flags_someFunction`` -private function, local variable ``_flags_someVariable_`` +public function ``flags_function`` +public function, local variable ``flags_variable_`` +private function ``_flags_function`` +private function, local variable ``_flags_variable_`` ================================ ======================== -Where it makes sense, variables can have the first letter of the second and -later words capitalized. For example, the local variable name for the total -number of test cases seen might be ``flags_totalTestsSeen_``. +Where it makes sense to improve readability, variables can have the first +letter of the second and later words capitalized. For example, the local +variable name for the help string length is ``flags_helpStrLen_``. + +There are three special-case global public variables used. They are used due to +overcome the limitations of shell scoping or to prevent forking. The three variables are: + + - flags_error + - flags_output + - flags_return Local Variable Cleanup ---------------------- |