PreviousUpNext

14.2.47  Sfprintf

The standard library Sfprintf API defines access to a text formatting facility inspired by the C printf() function.

The Sfprintf API is implemented by the sfprintf package.

The Sfprintf API source code is in src/lib/src/sfprintf.api.

For an alternate printf() inspired API, see Printf_Combinator.

The above information is manually maintained and may contain errors.

api {   Printf_Arg
        = BOOL
        Bool
        |
        CHAR
        Char
        |
        FLOAT
        Float
        |
        INT
        Int
        |
        LEFT
        (Int , Printf_Arg)
        |
        LINT
        multiword_int::Int
        |
        LUNT
        one_word_unt::Unt
        |
        QUICKSTRING
        quickstring__premicrothread::Quickstring
        |
        RIGHT
        (Int , Printf_Arg)
        |
        STRING
        String
        |
        UNT
        Unt
        |
        UNT8
        one_byte_unt::Unt;
    exception BAD_FORMAT String;
    exception BAD_FORMAT_LIST;
    sprintf' : String -> List(Printf_Arg ) -> String;
    fnprintf' : (String -> Void) -> String -> List(Printf_Arg ) -> Void;
    fprintf' : Output_Stream -> String -> List(Printf_Arg ) -> Void;
    printf' : String -> List(Printf_Arg ) -> Void;
    parse_format_string_into_printf_field_list : String -> List(printf_field::Printf_Field );
    printf_field_type_to_printf_arg_list : printf_field::Printf_Field_Type -> List(Printf_Arg );};

The following information is manually maintained and may contain errors. NB: fprintf, fnprintf, printf, and sprintf are not explicitly listed here because they are in fact special syntax implemented as derived forms in the Mythryl parser with the help of the src/lib/compiler/front/parser/raw-syntax/printf-format-string-to-raw-syntax.pkg module, which expands them into calls to the fprintf, fnprintf, printf, and sprintf functions documented here.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext