Hi Tom, others:
> Therefore, not requiring the brackets would introduce a parsing ambiguity.
> Does
> var A : [1, 3..5, 7, 10..12] real ;
> mean a four-dimensional array containing 9 elements? or a one-dimensional
> array containing 8 elements?
> I would choose the former and require the curly braces to force the latter
> interpretation:
> var A : [{1, 3..5, 7, 10..12}] real;
> (Now definitely a one-dimensional array.)
It seems like the latter interpretation would be problematic in the case
where the sets do not go in order, or where numbers are repeated. For
instance,
var A : [1, 7, 3..5, 10..12] real;
or
var A: [1, 3..9, 7, 10..12] real;
Since the ranges are used as indices, how should this situation be
handled? Should it sort the different values it obtains or alias the
index of the second slot to be 7? Should it ignore any duplicates
values? Should it throw an error when this situation arises?
Sorry if these are questions already addressed by sparse arrays.
-Lydia
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers