Is there a difference between declaring a class property "Dependent" versus "Dependent = true"?

The title says it all. The documentation doesn't make it clear whether or not there is a difference between
properties(Dependent)
aProp
end
and
properties(Dependent=true)
aProp
end
since it uses both seemingly interchangeably. Is there a difference?

 Akzeptierte Antwort

Matt J
Matt J am 12 Jul. 2019
Bearbeitet: Matt J am 12 Jul. 2019
Yes, they are equivalent. Also, you can do,
properties(~Dependent)
aProp
end
as an equivalent to,
properties(Dependent=false)
aProp
end
See also,

Weitere Antworten (1)

There is no difference. For attributes which are binary (true/false) then just putting the attribute name is the same as toggling it from its default state.

Kategorien

Mehr zu Software Development Tools finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018b

Gefragt:

am 12 Jul. 2019

Bearbeitet:

am 12 Jul. 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by