On May 31, 2016 2:54 PM, "Femto Trader" <femto....@gmail.com> wrote:
>
> Hello,
>
> I have a type like
>
> type V
> x::Float64
> y::Float64
> z::Float64
> end
>
> v = V(1.0,2.0,3.0)
>
> I read on http://docs.julialang.org/en/release-0.4/devdocs/reflection/
> that
> fieldnames(v)
> returns attributes of v as symbol
>
> I would like to access to field x using either :x symbol (or "x" string)
>
> I tried
>
> get(v, :x)
getfield