Function diagm() does not work in Julia v1.0.5?

I am trying to construct a diagonal matrix by using the function diagm() within a test project that is formed by a group of Julia files. When I include all of these files into the Julia terminal to run and prove if these files do not present any error, the next error is show up: “ERROR: LoadError: UndefVarError: diagm not defined”.

I was doing some small external tests trying to reproduce this running only the function command in other Julia terminal. I check these command in the versions 1.0.5 and in version 0.3.12.
The result was the following:
Using the v0.3.12, the error does not appear and the function works perfectly, but when I tried to do the same in the v1.0.5 the error showed up.

The code lines I am using for this unique test are those that I will show in the screenshot below:

There used to be many changes before the version 1.x.y. Code that worked in versions 0.3.x is probably not going to work because of those changes.

In versions above 1 you need to first use LinearAlgebra, which is the standard library that contains that function.

julia> using LinearAlgebra

julia> v = [3,4]
2-element Vector{Int64}:
 3
 4

julia> diagm(0=>v)
2×2 Matrix{Int64}:
 3  0
 0  4

This will work in 1.x if you add using LinearAlgebra

Thanks to you guys, I was forgetting to add the library ‘LinearAlgebra’. That was really helpfull to me!