You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

  • Use a single space between function name and opening parenthesis as well as between separating semicolons and within parenthesis.
    This facilitates easy selections within both Windows and Macintosh when double-clicking to highlight

    Function Name ( with ; parameters )

    good

    Function Name(with; parameters)

    bad

  • Do not use a space at the end of lines of code closed by the semicolon.
    Let ( [
      var.replaced = Substitute ( FunctionalArea » Tablename::fieldName ; "foo"; "bar" );
      var.anotherVar = "literal string"
    ];
      var.replaced & var.anotherVar
    )

    good

    Let ( [
      var.replaced = Substitute ( FunctionalArea » Tablename::fieldName ; "foo"; "bar" ) ;
      var.anotherVar = "literal string"
    ];
      var.replaced & var.anotherVar
    )

    bad

Single platform development

In order to stay cross-platform compatible with regards to code editing, the space on either side of the semicolon facilitates easier parameter selection using the mouse. However, if you are working within a team of developers or all developers are working on the Macintosh. It is allowable to remove the space between the parameter and the semicolon. This increases readability, but does force the developer to be familiar with using keyboard selection strategies, such as advancing to the next word and using the arrow keys an shift to navigate and select text.

  • No labels