On Mon, Jul 6, 2015 at 6:47 PM, Ferran Mazzanti
<[email protected]> wrote:
> Hi,
> I have a simple question: is it possible to feed printf() a list with a 
> variable number of arguments? Specifically I want to print a formatted list 
> of numbers contained in an arrary, but I can't tell in advance how many 
> elements does the array contain. Is there an easy way to do that, or should I 
> create a string with the different elements, looping over all of them?

If you are talking about `@printf`, I think it can only take constant
format string as first argument
If you can use `Formatting.jl`[1], it provides more flexible way of
formatting strings.
If you are talking about the c `printf`function (which is the only
printf "function" AFAICT), we currently don't support ccall with
Vararg signature.

[1] https://github.com/JuliaLang/Formatting.jl

> Thanks in advance,
> Ferran.

Reply via email to