TextUserInterfaces.jl icon indicating copy to clipboard operation
TextUserInterfaces.jl copied to clipboard

The prototype for printw is wrong

Open jmichel7 opened this issue 1 year ago • 3 comments

The declaration for printw is

printw(str::T)

This is completely wrong. printw is like the C function printf so the first argument is the format string and it takes a bunch of other arguments, the objects to be formatted. The prototype should be something like

printw(str::T,objs::Any...)

but I have no idea if this fits with the C declaration...

jmichel7 avatar Nov 21 '24 15:11 jmichel7

Thanks for the report! I will check how it can be fixed.

ronisbr avatar Nov 26 '24 13:11 ronisbr

I think the Julia interface with C does not allow for this case :(

https://discourse.julialang.org/t/passing-a-list-of-arguments-to-a-varargs-c-function/5271

ronisbr avatar Nov 27 '24 12:11 ronisbr

This looks like a question to ask on discourse or as a Julia issue

jmichel7 avatar Nov 27 '24 17:11 jmichel7