You need to pass a variable containing a Symbol. Try write = :write
On Mon, Mar 24, 2014 at 10:46 PM, J Luis <jmfl...@gmail.com> wrote: > The doc of getfield says > > getfield(*value*, *name::Symbol*) > > Extract a named field from a value of composite type. The syntax a.b calls > getfield(a, :b), and the syntax a.(b) calls getfield(a, b). > > but when I try the a.(b) variation, it errors (or it's me who errors?) > > julia> gmt_modules.write > "<?I,>?O" > > julia> gmt_modules.(write) > ERROR: type: getfield: expected Symbol, got Function > > > > >