# Include("\<file\_name.jl"\> does not include everything

**URL:** https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552
**Category:** General Usage
**Created:** [January 17, 2017, 9:24pm UTC](https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552 "2017-01-17T21:24:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![phillefjonk](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@phillefjonk](https://discourse.julialang.org/u/phillefjonk)
#### Post date: [January 17, 2017, 9:24pm UTC](https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552/1 "2017-01-17T21:24:31Z")

</div>

I have a file, coordinate\_transformations.jl that define three functions:

```julia
 function coordinate_transformation_e_frame_to_b_frame(vector, q0, q1, q2, q3)
 q0 = q[1]
 q1 = q[2]
 q2 = q[3]
 q3 = q[4]

 C_eb =
 [ q0^2+q1^2-q3^2-q3^2	2*(q1*q2 + q0q3)	2(q1*q3 - q0*q2);
   2(q1*q2 - q0*q3) q0^2-q1^2+q2^2-q3^2	2(q2*q3 +q0*q1);
   2(q1*q3 + q0*q2)	2(q2*q3 - q0*q1)	q0^2-q1^2-q2^2+q3^2] 

 rotated_vector = C_eb*vector 
 end

 function coordinate_transformation_b_frame_to_e_frame(vector, q0, q1, q2, q3)
 q0 = q[1]
 q1 = q[2]
 q2 = q[3]
 q3 = q[4]

 C_be =
 [ q0^2+q1^2-q3^2-q3^2	2(q1*q2 - q0*q3)	2(q1*q3 + q0*q2);
   2*(q1*q2 + q0q3) q0^2-q1^2+q2^2-q3^2	2(q2*q3 - q0*q1);
   2(q1*q3 - q0*q2)	2(q2*q3 +q0*q1) q0^2-q1^2-q2^2+q3^2]

 rotated_vector = C_be*vector
 end

 function coordinate_transformation_n_frame_to_b_frame(vector, Psi, Theta, Phi)
   C_nb = 
   [cos(theta)*cos(psi) cos(theta)*sin(psi) -sin(theta);
   sin(phi)*sin(theta)*cos(psi)-cos(phi)*sin(psi)	sin(phi)*sin(theta)*sin(psi) + cos(phi)*cos(psi) sin(phi)*cos(theta);
   cos(phi)*sin(theta)*cos(psi) + sin(phi)*sin(psi) cos(phi)*sin(theta)*sin(psi)- sin(phi)*cos(psi) cos(phi)*cos(theta)]
  
   rotated_vector = C_nb*vector 
  
   return rotated_vector
 end

```

When I use

```julia
 include("coordinate_transformations.jl")

```

in REPL it only recognize the last function definition

```julia
 julia> include("coordinate_transformations.jl")
 coordinate_transformation_n_frame_to_b_frame (generic function with 1 method)

```

Why are not the other two functions recognized and defined in the present scope?

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [January 17, 2017, 9:28pm UTC](https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552/2 "2017-01-17T21:28:21Z")

</div>

Please update your post using triple back quotes ` around the code-blocks. It will the use mono-space font and syntax highlighting. The style you used is for quotes.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [January 17, 2017, 9:34pm UTC](https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552/3 "2017-01-17T21:34:37Z")

</div>

> [@phillefjonk](#):
>
> Why are not the other two functions recognized and defined in the present scope?

What makes you say they are not?

---

<div class="post-metadata">

### Author: ![kevin.squire](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevin.squire/32/62_2.png) [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)
#### Post date: [January 18, 2017, 5:15am UTC](https://discourse.julialang.org/t/include-file-name-jl-does-not-include-everything/1552/4 "2017-01-18T05:15:30Z")

</div>

When you call include, it returns the result of the evaluation of the last code block in the file, which in your case is the function definition of `coordinate_transformation_n_frame_to_b_frame`.

The rest of the functions defined in the file will be defined in the current scope.

Cheers,  
Kevin
