Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Add comments (// and /* ... */) to scripts
  • Include blank lines between statements
  • Use spaces within expressions
  • Indent subclauses sub-clauses by 4 spaces
  • Ensure that attributes which represent the same thing in different Streams, have the same name - this is necessary when doing a Union in a calculate stream but is also important in other types of merge
  • Add descriptions to all models
  • Add descriptions to all model elements. Anybody looking at a model will first look at the descriptions of the elements. They should be able to discern the flow and the high level logic of the model just from the descriptions. Any use of Input or Output Multipliers should be noted in the stream description (as this it typically a significant part of any model).

...

Note that closing brackets should always line up with the start of the statement (see the do() and if() statements above)

Layout for switch()

switch( [ condition expression 1, Statement 1 ], [ condition expression 2, Statement 2 ], // default _NULL )

Note that the _NULL statement is currently required

Example Layout

Code Block
// Example code layout 
if( condition,
    do(
        Statement 1,

        Statement 2,

        .... Statement n
    ),

// else
    Statement A
)