"Overload" the show function like this:

import Base.show

function show(io::IO, thing::your_type)
    print(string("data_type with name: ", thing.names))
end





On Monday, February 9, 2015 at 12:04:51 PM UTC+1, Evan Pu wrote:
>
> I have a type with a lot of fields, but when I want to print it I only 
> want to output the name field of that type.
> So when I print an array of objects of this type, I get a on the prinout 
> an array of names instead of a huge clutter of prints.
>
> how might I do that?
> much thanks!!
>

Reply via email to