Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changing Let function bracket specifications
  • Let functions with only one variable declaration can be defined on one line
    No Format
    Let ( ~someVar = TableFunctionalArea » Tablename::fieldName ; If ( ~someVar = "Active"; True; False ) )
    
  • Example Let function with indenting
    No Format
    
    Let (
            [
                ~privateVariable = List ( "one" ; "two" ; "three" );
                $localVariable = Substitute ( ~privateVariable ; [ ¶ ; "," ] );
                $$globalVariableTopValue = GetValue ( ~privateVariable ; 1 )
            ];
                "Your Let function result is " & $localVariable
    )
    
  • Let functions with multiple variables include the opening parenthesis and bracket on the same line use both opening and closing brackets on the own lines
    Note: both opening and closing brackets should be indented and on their own line.
    No Format
    
    Let (
            [
                variable = expression
            ];
                "result is indented 2 tabs"
    )
    

    good

    No Format
    Let ( [

    bad

    No Format
    Let (
    [
    

    bad

  • Closing Let variable declarations end on their own line. This indicates the start of the result.
    No Format
    ];

    good

    No Format
    endOfFunction ) ];

    bad

  • Calculation scoped variables use camelCase and are identified by a preceding variable indicator of "var."~ (tilde). The ~ character in these standards represents the private scope.
    This makes it easy to distinguish calculation variables from custom function arguments, $variables, and Table::fieldNames
    No Format
    ~someVariable

    good

    No Format
    someVariable

    bad

...