Would this work for you:
julia> a = 1e5*rand(1000)
julia> for i in a
@printf("%12.6f\n", i)
end
74708.038385
71244.774457
5057.229038
3761.297034
...
Remember that loops are fast in Julia...
Kaj
On Tuesday, July 14, 2015 at 9:14:37 AM UTC+3, Ferran Mazzanti wrote:
>
> Thanks for the info. Actually my question comes from old fortran style,
> where I can write something of the form
> Write(1,'1000f12.6') a
> where a is an array. The string inside the write function says I can print
> 1000 doubkes in 12 characters with 6 decimals. So the string is a constant
> literal, and array a can contain 1000 or less elements that will be
> properly formatted. Is there a way to do something like this in Julia?
> What if Inwant to print 1000 float64 on the same line with a given format
> for each element?
> Maybebthis is easier...
> Best regards and thanks.
> Ferran.