Conventions

When developing post processors it is highly recommended that you follow strict conventions for the source code to increase the maintainability, allow easy sharing of future functionality between post configurations, and improve understanding of the source code.

Source code guidelines

  1. Indent all multi-line bodies by 2 spaces.
    function myFunction() {
    // indent by 2 spaces
    }
  2. Do not use TAB (tabulator) to avoid confusion when using different editors.
  3. Use descriptive names for all the variables, functions, and similar. Avoid short generic names like var1, var2, and var3 that do not tell anything about the usage.
  4. Avoid long and complex functions. Use smaller helper functions where relevant to simplify the source code.
  5. Add descriptive comments to allow better understanding of the behavior.
  6. Functions start with a lowercase letter and each following word starts with a capital letter (e.g. myFunction).
  7. Variables and properties are written similarly to function names (e.g. myVariable and myProperty).
  8. Classes use capital letter for the first letter in each word (e.g. MyClass).
  9. Constants are written in capital letters only with underscore separating words (e.g. MY_CONSTANT).


Generated by Autodesk, Inc. 12 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.