Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correctly narrow sprintf's claimed abilities


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 exampleCurrently, the formatting string for numbers supports %d and does not support escaping a literal %d:

Code Block
a = 10
cb = a.sprintf("< %d>") // cb = "< 10>"