Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Document range for x>n

...

Code Block
languagejavascript
(0).range(10) // Returns [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

Note the parenthesis on the number being operated on. These are required in order for the KRL to parse.If n is less than x, the sequence is decreasing and doesn't include n or n+1.

sprintf()

The sprintf() operator can be applied to either a number or a string. The operator takes a formatting string as its sole argument. The formatting string follows the conventions for sprintf() established in other languages. Specifically, the KRL version of sprintf() follows the formatting conventions for Perl. For example:

Code Block
languagejavascript
themeConfluencelanguagejavascript
a = 10
c = a.sprintf("< %d>") // c = "< 10>"

...