How to print some elements of array in one line in a file?

@CRquantum, you can broadcast like this:

A = [1.0, 2.0, 3.0, 4.0]
B = [100.0, 200.0, 300.0, 400.0]
fmt = Printf.Format("%.3f +- %.3f\n")
open("fileout3.txt", "a") do io
    Printf.format.(Ref(io), Ref(fmt), B, A)
end;
2 Likes