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

**URL:** <https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895>\
**Category:** General Usage\
**Tags:** io, formatting\
**Created:** [August 24, 2021, 5:19am UTC](https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895 "2021-08-24T05:19:37Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 24, 2021, 10:59pm UTC](https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895/11 "2021-08-24T22:59:41Z")

</div>

btw:

```julia
julia> A = [1.0, 2.0, 3.0, 4.0];

julia> B = [100.0, 200.0, 300.0, 400.0];

julia> using Measurements

julia> C = B .± A
4-element Vector{Measurement{Float64}}:
 100.0 ± 1.0
 200.0 ± 2.0
 300.0 ± 3.0
 400.0 ± 4.0

```

not only do they look nice, they behave correctly. (i.e. error propagates)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-print-some-elements-of-array-in-one-line-in-a-file/66895)._
