Re: [julia-users] difference between inside and outside constructors

2014-05-08 Thread Leah Hanson
The main thing is that an inner constructor replaces the default constructor. AA(1,2) # this will work. BB(1,2) # this will throw an error You should also be able to see this in the output for "methods(AA)" and "methods(BB)". -- Leah On Thu, May 8, 2014 at 5:51 PM, cnbiz850 wrote: > Would

[julia-users] difference between inside and outside constructors

2014-05-08 Thread cnbiz850
Would anyone explain the differences between the following two ways of defining a composite type? = type AA aa bb function AA() aa=1 bb=2 new(aa,bb) end end type BB aa bb end function BB() aa=1 bb=2 return BB(aa,bb) end