From 6f30d8b154fb6bf4697c22d2267eda5035a44d5c Mon Sep 17 00:00:00 2001 From: goodale Date: Fri, 6 Oct 2000 09:37:17 +0000 Subject: Adding one more point to function style. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1860 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/MaintGuide/Style.tex | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/MaintGuide') diff --git a/doc/MaintGuide/Style.tex b/doc/MaintGuide/Style.tex index b266e763..1fc0060b 100644 --- a/doc/MaintGuide/Style.tex +++ b/doc/MaintGuide/Style.tex @@ -213,5 +213,10 @@ All functions should have a grdoc header. They should have a single place of return at the end of the function to make it easy to tidy up and work out what is going on. +Where possible variables should be declared at the top of the function with +no initialisation, and then initialised after all variable declarations. Of +course this can't apply to static variables, 'though these should be kept to +a minimum so we can make a thread-safe version of Cactus later. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{cactuspart} -- cgit v1.2.3