This site has been deprecated. Do not edit pages here. Please visit the new Pico Labs documentation.

Skip to end of metadata
Go to start of metadata


The following operators are valid operators for numbers. Note: In addition to these there are also functions in the math module.


The chr() operator returns a string containing the character represented by the ASCIIi value of the number it operates on.  For example:

The inverse of chr() is ord()


The range operator returns an array containing x to n elements. The number it operates on is the start of the range and the first parameter is the end of the range. For example:

Note the parenthesis on the number being operated on. These are required in order for the KRL to parse.


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: