Differences between revisions 7 and 8
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
== Code style == == Code format style ==
Line 15: Line 15:
The script {{{~nicks/bin/do-astyle-onefile}}} will reformat a file to these conventions, making use the [[http://astyle.sourceforge.net/|'astyle' utility]]. The script {{{~nicks/bin/do-astyle-onefile}}} will reformat a file to these conventions, making use of the [[http://astyle.sourceforge.net/|'astyle' utility]].

Coding Guide

This page is a loose collection of various coding guides and tips for FreeSurfer programmers.

Code format style

  • Consistent usage of either ANSI-style or GNU-style braces.
  • Do not use tabs. Setup your editor to convert tabs to spaces.
  • 2 spaces per indent (tab).
  • Do not exceed 80 characters per line.
  • Delete trailing whitespace from end of line.

The script ~nicks/bin/do-astyle-onefile will reformat a file to these conventions, making use of the 'astyle' utility.

MRI Cheat Sheet

MRI cheat sheet

Ever wonder when you should use MRIcopy() vs MRIclone()? DougGreve has drawn up a little cheat sheet for some of these MRI functions.

Naming Conventions

A page of naming convention suggestions.

DevelopersGuide/CodingGuide (last edited 2011-09-14 11:16:08 by NickSchmansky)