Printing the name of an array

hey people,

I tried to print the name of an array, as I realized it is actually giving me out the values, i.e.:

A = [5,4,6,7]

print(A,“=”, something)

→ [5,4,6,7] = something

but i would rather have something like:

print(A,“=”, something)

→ A = something

cheers

That is what the @show macro does:

help?> @show
  @show

  Show an expression and result, returning the result.

example:

julia> A = [5,4,6,7];

julia> @show A;
A = [5, 4, 6, 7]
5 Likes

You can try @show A it’ll print something like what you’re describing.

1 Like

thank you so much !