There are many coding and and design guidelines for Niagara that are on dead trees and not available online yet.
As a starting point, everything is indented with normal 8 character tabs, end braces are on their own line, and start braces are at the end of the opening line. For now, a trivial example --- that will probably look weird depending upon the tab stops in your browser:
#includeint main(int argc, char **argv) { int i; unsigned u = 0; for (i = 0; i < argc; i++) { if (i & 1) { printf("odd arg %d == %s\n", i, argv[i]); } else printf("even arg %d == %s\n", i, argv[i]); } switch (argc) { case 3: u = 1; /*FALLTHROUGH*/ case 2: case 1: printf("u = %u\n", u); break; default: printf("%s: unknown args %d\n", argv[0], argc); break; } return 0; }
If you use emacs to write code, there is a Niagara C++ mode setup
for people to use so that everyone will be using the same indentation.
To use this add the following lisp to your .emacs
file:
; Use Niagara C/C++ indenting and formatting. (load-file "/p/niagara/s/emacs.el")