Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added an example

...

Note three different styles: all on a single line, or on multiple lines, one per expression, either ending with the vertical bar or with the expression, but in either case the expressions are lined up, and the vertical bars are lined up. These styles are not required by the language syntax but are recommended for readability of your code.

Another example, in a function to convert GMT time to Mountain Time during 2020:

Code Block
    makeMT = function(ts){
      MST = time:add(ts,{"hours": -7});
      MDT = time:add(ts,{"hours": -6});
      MDT > "2020-11-01T02" => MST |
      MST > "2020-03-08T02" => MDT |
                               MST
    }