Hi folks,
in many of my julia codes I define my own type variables, in such a way that nothing is by default initialized, expecting the user will initialize the fields he needs. For instance
type fooo
x :: Int
y :: Float64
z :: Int
t :: Float64
fooo() = new()
end;
and then
kkk = fooo()
kkk.x = 10
kkk
gives as result
fooo(10,6.90533903150177e-310,139765626155696,6.90534204103743e-310)
while, obviously
isdefined(kkk,:x)
yields
true
but
isdefined(kkk,:y)
also yields
true
because some values have been set to kkk.y. My question is: is there a way to get to know that kkk.x has been given a value while kkk.y contains garbage and has not been given any value by the user?
Best regards and thanks,
Ferran.