> we are considering to make the range selection uniform among json, sequencer and
> odbedit "set" command. Having multiple ranges like [1,4-5] will be quite some work, so
> my question is did you just implement it on the json side because it was easy, or are
> there experiments who really need it? Wouldn't it be enough to have
It has been a long time, but most likely I designed the interface to work this
way to permit maximum flexibility for writing into an array using just one
The generalized form is:
where range is:
array index or
index2-index1 (write in reverse order)
This is all documented here:
I think it is too late to change it.
> This way we always have only one db_set_data() value behind that. Any set of indices
> we have to split into several db_set_data()
Sounds good. I think it is easy to have a common implementation:
One would need following functions:
parse range selection from string into std::vector<int> of array indices (we already have it)
call db_set_data_range() (this is easy to add).
> trouble by triggering a hot link on each access.
There is no escaping this trouble. Half the experiments want notification
"per array", the other half, "per array element". We cannot choose one or the other for them,
we have to provide a way for the user to say how they want it.
P.S. With existing ODB calls, you cannot do [n-m] ranges. You can do whole array or you
can do one-element-at-a-time.