tt = t( ["" for i = 1:120]... )
On Mon, Mar 24, 2014 at 9:43 PM, J Luis <[email protected]> wrote: > Let's say I have this composite type > > julia> type t > aa::ASCIIString; > bb::ASCIIString; > end > > and try to fill it a la C (or Matlab) > > julia> tt=t > t (constructor with 1 method) > > julia> tt.aa="AA" > ERROR: type DataType has no field aa > > so bad surprise. I can't. So I have to do for instance > > julia> tt=t("AA","BB"); > > but my real type is 120 members long and I don't want to do it that way (I > would for sure make lots of mistakes). So I want to try like this > > julia> tt=t("",""); > > julia> tt.aa="AA" > "AA" > > > but do I avoid doing tt=t("","","",... 120 times?) > > Tried this but no luck either > > julia> tt=t(repmat([""],10)); > ERROR: no method t(Array{ASCIIString,1}) > > Thanks > > > >
