laura posted on 03-17-2009 5:23 AM
Do Variable.Array, Variable.Constant, and Variable.Observed differ in more than just different default settings of the isReadOnly and ObservedValue property?
I would like to use the convenient constructor for jagged arrays of Variable.Constant to yield an observed Variable.
The following code works:
let varArray= (Variable.Constant<Discrete>((myNestedArray:_[][]), outerRange , innerRange))
do varArray.AddAttribute(valueRange)
do varArray.IsReadOnly <- false
later I can change the value by
do varArray.ObservedValue<- otherNestedArray
Is there a difference between this varArray and an array that is created via the Variable.Observed constructor?
I guess I can create an analogous variable via Variable.Array
let varArray = (Variable.Array<_>(Variable.Array<Discrete>(innerRange), outerRange))
and call
do varArray.ObservedValue<- otherNestedArray
Right?
Laura