# Subtleties of type and immutable and memory layout when using ccall

**URL:** <https://discourse.julialang.org/t/subtleties-of-type-and-immutable-and-memory-layout-when-using-ccall/1328>\
**Category:** General Usage\
**Tags:** ccall\
**Created:** [January 6, 2017, 3:49pm UTC](https://discourse.julialang.org/t/subtleties-of-type-and-immutable-and-memory-layout-when-using-ccall/1328 "2017-01-06T15:49:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jtravs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jtravs/32/2010_2.png) [@jtravs](https://discourse.julialang.org/u/jtravs)\
**Post date:** [January 6, 2017, 4:14pm UTC](https://discourse.julialang.org/t/subtleties-of-type-and-immutable-and-memory-layout-when-using-ccall/1328/2 "2017-01-06T16:14:04Z")

</div>

It seems like the discussion in:

> [@Create a type with pointer to array](https://discourse.julialang.org/t/create-a-type-with-pointer-to-array/1306):
>
> hi all, I’m new to Julia, and still getting used to the Julia-way of doing things. I was wondering if there is anything that would work as a pointer would in C, or as a reference variable in C++? the particular use case I have in mind is as follows. suppose I create a new type, called “Coord”, that will store a particular coordinate system. immutable Coord val::Array{Real} name::AbstractString end and use it to create my coordinate x: x0 = 0:0.05:1 x = Coord(x0, "mycoord") Now I w…

Has ended up with a similar content.

---

_[View the full topic](https://discourse.julialang.org/t/subtleties-of-type-and-immutable-and-memory-layout-when-using-ccall/1328)._
