‘fiednames’
function return all the field names of a composite type.
julia> type Student firstName::ASCIIString lastName::ASCIIString id::Int32 end julia> stud1 = Student("Hari Krishna","Gurram", 514) Student("Hari Krishna","Gurram",514) julia> fieldnames(stud1) 3-element Array{Symbol,1}: :firstName :lastName :id
No comments:
Post a Comment