c0de 0.3.0This page in English

Diese Seite ist noch nicht übersetzt. Sie wird auf Englisch angezeigt.

FORMAT ​

Formats a value as text with a format string.

Conversions start with %, e.g. %5d (integer, 5 wide), %.2f (2 decimal places), %s (any value), %tF and %tT (date and time). A wrong type raises TYPE_MISMATCH, a bad format string INVALID_ARGUMENT.

Parameters and results

  • value BOOLEAN|INTEGER|FLOAT|CHAR|STRING|TIME: the value
  • format STRING: the format string
  • result result STRING: the formatted text

Example

c0de
CALL c0de/strings/FORMAT
    PARAMETER value now ;
    PARAMETER format "%tF %tT" ;
    RESULT result text