Skip to content

printf doesn't work as expected #420

Closed

Description

@pfefferminz132

(printf "%d" 42) gives some strange and unexpected output.

Activity

  1. heyLu commented on Oct 31, 2015

    @heyLu
    Member

    Use the typical printing functions from Clojure. (print, println, pr and prn)

    Our printf function only accepts a single string as an argument. Not sure if the FFI can handle the full signature for printf yet. Also, printf returns the number of bytes written, which might contribute to the confusing output.

  2. pfefferminz132 commented on Oct 31, 2015

    @pfefferminz132
    Author

    clojure has printf, too and it works like it supposed to. pixie's printf accepts more than one argument
    e.g. (printf "%d and %d" 42 43). It's just not the output that one expects.
    (printf "%s and %s" 42 43) segfaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions